Skip to content

Commit

Permalink
Revert "ecc: fix buffer overflow"
Browse files Browse the repository at this point in the history
This reverts commit 136f30b.
  • Loading branch information
kevans91 authored and bapt committed Mar 26, 2024
1 parent 3766425 commit d0d6c93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion external/libder/libder/libder_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ libder_write(struct libder_ctx *ctx, struct libder_object *root, uint8_t *buf,
/* Allocate if we weren't passed a buffer. */
if (*bufsz == 0) {
*bufsz = needed;
buf = malloc(needed + 1);
buf = malloc(needed);
if (buf == NULL)
return (NULL);
} else if (needed > *bufsz) {
Expand Down

0 comments on commit d0d6c93

Please sign in to comment.