don't use strncpy() to copy TUIDs
latest since 77acc268, the code prior to these statements ensures that
the full length is available, so just use memcpy(). the code for
comparing TUIDs uses memcmp() anyway.
This commit is contained in:
parent
d754608f55
commit
1e939bafd8
2 changed files with 2 additions and 2 deletions
|
|
@ -1060,7 +1060,7 @@ parse_fetch_rsp( imap_store_t *ctx, list_t *list, char *s ATTR_UNUSED )
|
||||||
cur->gen.srec = 0;
|
cur->gen.srec = 0;
|
||||||
cur->gen.msgid = msgid;
|
cur->gen.msgid = msgid;
|
||||||
if (tuid)
|
if (tuid)
|
||||||
strncpy( cur->gen.tuid, tuid, TUIDL );
|
memcpy( cur->gen.tuid, tuid, TUIDL );
|
||||||
else
|
else
|
||||||
cur->gen.tuid[0] = 0;
|
cur->gen.tuid[0] = 0;
|
||||||
if (ctx->gen.uidnext <= uid) /* in case the server sends no UIDNEXT */
|
if (ctx->gen.uidnext <= uid) /* in case the server sends no UIDNEXT */
|
||||||
|
|
|
||||||
|
|
@ -1132,7 +1132,7 @@ maildir_init_msg( maildir_store_t *ctx, maildir_message_t *msg, msg_t *entry )
|
||||||
entry->msgid = 0; /* prevent deletion */
|
entry->msgid = 0; /* prevent deletion */
|
||||||
msg->gen.size = entry->size;
|
msg->gen.size = entry->size;
|
||||||
msg->gen.srec = 0;
|
msg->gen.srec = 0;
|
||||||
strncpy( msg->gen.tuid, entry->tuid, TUIDL );
|
memcpy( msg->gen.tuid, entry->tuid, TUIDL );
|
||||||
if (entry->recent)
|
if (entry->recent)
|
||||||
msg->gen.status |= M_RECENT;
|
msg->gen.status |= M_RECENT;
|
||||||
if (ctx->gen.opts & OPEN_FLAGS) {
|
if (ctx->gen.opts & OPEN_FLAGS) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue