Merge pull request #569 from mrdeep1/cmdline_read_user

cmdline_read_user: Fix NULL terminating code
This commit is contained in:
obgm authored and GitHub committed 2020-11-13 22:58:59 +01:00
commit f29f053d53
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1306,7 +1306,7 @@ cmdline_read_user(char *arg, unsigned char **buf, size_t maxlen) {
if (len) {
*buf = (unsigned char *)arg;
/* len is the size or less, so 0 terminate to maxlen */
buf[len] = '\000';
(*buf)[len] = '\000';
}
/* 0 length Identity is valid */
return len;
+1 -1
View File
@@ -2222,7 +2222,7 @@ cmdline_read_user(char *arg, unsigned char **buf, size_t maxlen) {
if (len) {
*buf = (unsigned char *)arg;
/* len is the size or less, so 0 terminate to maxlen */
buf[len] = '\000';
(*buf)[len] = '\000';
}
/* 0 length Identity is valid */
return len;