(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/maildir/maildir-copy.c) |
| |
| 31 | | | static int do_save_mail_size(struct maildir_mailbox *mbox, const char *path, |
| 32 | | | struct hardlink_ctx *ctx) |
| 33 | | | { |
| 34 | | | const char *fname, *str; |
| 35 | | | struct stat st; |
| 36 | | | uoff_t size; |
| 37 | | | |
| 38 | | | fname = strrchr(path, '/'); |
| 39 | | | fname = fname != NULL ? fname + 1 : path; |
Event 1:
fname != (void *)0 evaluates to false.
hide
|
|
| 40 | | | |
| 41 | | | if (!maildir_filename_get_size(fname, , |
| 42 | [+] | | &size)) { |
 |
| 43 | | | if (stat(path, &st) < 0) { |
| 44 | | | if (errno == ENOENT)
x /usr/include/asm-generic/errno-base.h |
| |
5 | #define ENOENT 2 /* No such file or directory */ |
| |
|
| 45 | | | return 0; |
| 46 | | | mail_storage_set_critical(&mbox->storage->storage, |
| 47 | | | "stat(%s) failed: %m", path); |
| 48 | | | return -1; |
| 49 | | | } |
| 50 | | | size = st.st_size; |
| 51 | | | } |
| 52 | | | |
| 53 | [+] | | str = t_strdup_printf(",%c=%"PRIuUOFF_T, , size); |
 |
| 54 | [+] | | str_insert(ctx->dest_path, ctx->base_end_pos, str); |
Event 46:
str, which evaluates to the value assigned to ret at data-stack.c:335, is passed to str_insert() as the third argument. See related event 45.
hide
|
|
 |
| |