(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/dbox/dbox-sync-rebuild.c) |
| |
| 211 | | | dbox_sync_index_uid_file(struct dbox_sync_rebuild_context *ctx, |
| 212 | | | const char *dir, const char *fname) |
| 213 | | | { |
| 214 | | | struct dbox_file *file; |
| 215 | | | unsigned long uid; |
| 216 | | | char *p; |
| 217 | | | uoff_t offset = 0; |
| 218 | | | int ret; |
| 219 | | | |
| 220 | | | fname += sizeof(DBOX_MAIL_FILE_MULTI_PREFIX)-1; |
| 221 | | | uid = strtoul(fname, &p, 10); |
| 222 | | | if (*p != '\0' || uid == 0 || uid >= (uint32_t)-1) { |
| 223 | | | i_warning("dbox %s: Ignoring invalid filename %s", |
| 224 | | | ctx->mbox->path, fname); |
| 225 | | | return 0; |
| 226 | | | } |
| 227 | | | |
| 228 | | | file = dbox_file_init(ctx->mbox, uid | DBOX_FILE_ID_FLAG_UID); |
Unreachable Call
The highlighted code will not execute under any circumstances. This may be because of: |
|
| 229 | | | file->current_path = i_strdup_printf("%s/%s", dir, fname); |
| 230 | | | |
| 231 | | | ret = dbox_sync_index_file_next(ctx, file, &offset) < 0 ? -1 : 0; |
| 232 | | | dbox_file_unref(&file); |
| 233 | | | return ret; |
| 234 | | | } |
| |