Skip to content

Commit

Permalink
assume both pointers are non-NULL even if len==0
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuho committed Dec 20, 2024
1 parent 9ce1ee5 commit ebb6ddb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/picotls.c
Original file line number Diff line number Diff line change
Expand Up @@ -6958,10 +6958,8 @@ static int expand_logbuf_or_invalidate(const char *prefix, size_t prefix_len, si
return 0;
}

if (prefix_len != 0) {
memcpy(logbuf.buf.base + logbuf.buf.off, prefix, prefix_len);
logbuf.buf.off += prefix_len;
}
memcpy(logbuf.buf.base + logbuf.buf.off, prefix, prefix_len);
logbuf.buf.off += prefix_len;

return 1;
}
Expand Down

0 comments on commit ebb6ddb

Please sign in to comment.