mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-17 10:35:10 +00:00
Avoid passing null pointer to strncpy
This commit is contained in:
parent
a9ecfbaae5
commit
87a31ba039
@ -131,7 +131,9 @@ static void mbox_scan(char *args, char *output, size_t max_len) {
|
||||
tmp = strtok(nullptr, " ");
|
||||
if (tmp != nullptr) { start = tmp; }
|
||||
}
|
||||
strncpy(mbox_mail_spool, start, DEFAULT_TEXT_BUFFER_SIZE);
|
||||
if (start != nullptr) {
|
||||
strncpy(mbox_mail_spool, start, DEFAULT_TEXT_BUFFER_SIZE);
|
||||
}
|
||||
free(copy_args);
|
||||
}
|
||||
if (strlen(mbox_mail_spool) < 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user