]> mj.ucw.cz Git - libucw.git/commitdiff
bgets_mp(): Added a non-intuitive warning to documentation.
authorPavel Charvat <pchar@ucw.cz>
Wed, 10 Jan 2018 11:16:31 +0000 (12:16 +0100)
committerPavel Charvat <pchar@ucw.cz>
Wed, 10 Jan 2018 11:16:31 +0000 (12:16 +0100)
ucw/fastbuf.h

index 0a04176a0f8ec18155996d9a6c3b5e1d55e4da41..77e5ecb0b81a9ef465e0bbb888f3503cd41082be 100644 (file)
@@ -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);