From a7bae3293ad367903df28054af1e0b9be3d169b5 Mon Sep 17 00:00:00 2001 From: Pavel Charvat Date: Wed, 10 Jan 2018 12:16:31 +0100 Subject: [PATCH] bgets_mp(): Added a non-intuitive warning to documentation. --- ucw/fastbuf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/ucw/fastbuf.h b/ucw/fastbuf.h index 0a04176a..77e5ecb0 100644 --- a/ucw/fastbuf.h +++ b/ucw/fastbuf.h @@ -752,6 +752,7 @@ struct bb_t; uint bgets_bb(struct fastbuf *f, struct bb_t *b, uint limit); /** * Read a string, strip the trailing `\n` and store it into buffer allocated from a memory pool. + * CAVEAT: Internally allocates the whole line on stack -> can segfault if too long. **/ char *bgets_mp(struct fastbuf *f, struct mempool *mp); -- 2.39.2