mirror of https://github.com/openbsd/ports.git
coreutils: fix heap buffer overflow
This was introduced when improving UBsan reports. Probably a new variety of bugs to be classified in the same family as silencing compiler and coverity warnings. https://marc.info/?l=oss-security&m=170556990821840&w=2 ok bcallah (maintainer)
This commit is contained in:
parent
7343ca2fc5
commit
8f0af47b27
|
@ -2,6 +2,7 @@ COMMENT = file, shell and text manipulation utilities
|
|||
|
||||
DISTNAME = coreutils-9.4
|
||||
CATEGORIES = sysutils
|
||||
REVISION = 0
|
||||
|
||||
MAINTAINER = Brian Callahan <bcallah@openbsd.org>
|
||||
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
Fix heap buffer overflow
|
||||
|
||||
https://github.com/coreutils/coreutils/commit/c4c5ed8f4e9cd55a12966d4f520e3a13101637d9
|
||||
https://marc.info/?l=oss-security&m=170556990821840&w=2
|
||||
|
||||
Index: src/split.c
|
||||
--- src/split.c.orig
|
||||
+++ src/split.c
|
||||
@@ -809,10 +809,7 @@ line_bytes_split (intmax_t n_bytes, char *buf, idx_t b
|
||||
{
|
||||
cwrite (n_out == 0, hold, n_hold);
|
||||
n_out += n_hold;
|
||||
- if (n_hold > bufsize)
|
||||
- hold = xirealloc (hold, bufsize);
|
||||
n_hold = 0;
|
||||
- hold_size = bufsize;
|
||||
}
|
||||
|
||||
/* Output to eol if present. */
|
Loading…
Reference in New Issue