overflow by 1 byte, ... sigh.
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -410,7 +410,7 @@ mbox_tmpfile (mailbox_t mailbox, char **pbox) | ... | @@ -410,7 +410,7 @@ mbox_tmpfile (mailbox_t mailbox, char **pbox) |
410 | else | 410 | else |
411 | basename = mud->name; | 411 | basename = mud->name; |
412 | *pbox = calloc (strlen (tmpdir) + strlen ("MBOX_") + | 412 | *pbox = calloc (strlen (tmpdir) + strlen ("MBOX_") + |
413 | strlen (basename) + 1, sizeof (char)); | 413 | strlen (basename) + 2/* separator + null */, sizeof (char)); |
414 | if (*pbox == NULL) | 414 | if (*pbox == NULL) |
415 | return NULL; | 415 | return NULL; |
416 | sprintf (*pbox, "%s/%s%s", tmpdir, "MBOX_", basename); | 416 | sprintf (*pbox, "%s/%s%s", tmpdir, "MBOX_", basename); | ... | ... |
-
Please register or sign in to post a comment