Age | Commit message (Collapse) | Author |
|
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
and shuffle tokens memsetting around.
No obj-code changes.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
If line is longer then size of given buffer and buffer is not allocated by
the config parser itself, then discard rest of line.
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
We must always initialize line pointer since data pointer might
have changed due to a realloc (in getserv.c for example).
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
We need to update the parser->line pointer on realloc and do not
initialize the token array til after the potensial realloc in
bb_get_chunk_with_continuation().
While here, also replace a realloc() with malloc() where pointer always
is NULL.
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This patch fixes the following build error:
CC libc/misc/internals/__h_errno_location.os
CC libc/misc/internals/parse_config.os
libc/misc/internals/parse_config.c: In function
'bb_get_chunk_with_continuation':
libc/misc/internals/parse_config.c:77: error: 'PAGE_SIZE' undeclared (first use in this function)
libc/misc/internals/parse_config.c:77: error: (Each undeclared identifier is reported only once
libc/misc/internals/parse_config.c:77: error: for each function it appears in.)
make[2]: *** [libc/misc/internals/parse_config.os] Error 1
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
e.g. getservbyname()
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
fgets will happily write over allocated area limits. Adjusted the
buffer size according to how much is already read.
Also increase the maximum default line length, as 80 is slightly
small. It might be better if bb_get_chunk_with_continuation would
reallocate the line buffer if it was not user given.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|