From 0b6c6a9c9f555a33d681290cce77510460457c03 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 24 Mar 2008 00:04:42 +0000 Subject: lpd: fix OOM vulnerability (was eating arbitrarily large commands) --- include/libbb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/libbb.h b/include/libbb.h index 9f208b390..07f74e476 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -529,7 +529,7 @@ extern char *reads(int fd, char *buf, size_t count); // Read one line a-la fgets. Reads byte-by-byte. // Useful when it is important to not read ahead. // Bytes are appended to pfx (which must be malloced, or NULL). -extern char *xmalloc_reads(int fd, char *pfx); +extern char *xmalloc_reads(int fd, char *pfx, size_t *maxsz_p); extern ssize_t read_close(int fd, void *buf, size_t count); extern ssize_t open_read_close(const char *filename, void *buf, size_t count); extern void *xmalloc_open_read_close(const char *filename, size_t *sizep); -- cgit v1.2.3