diff options
author | Natanael Copa <natanael.copa@gmail.com> | 2010-10-14 06:35:05 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2010-10-14 14:59:57 +0200 |
commit | 5cb23c3c734fad8fcfcd09eef34f666f04a0af5e (patch) | |
tree | 4a59c8fdd96c6ac902ccc10de0f6ac8227a8c897 /libc/misc/ttyent/getttyent.c | |
parent | 54187ed0f082d145955a932f67259668dd038f65 (diff) |
getservice: getservent_r must return ERANGE when buffer is too small
This fixes issue introduced by 72e1a1ce186c39f07282398e2af9eb0253e60f15
This should also fix the following testcase to exit with error rather
than cause an endless loop.
int main(void) {
if (getservbyname("non-existing", "udp") == NULL)
err(1, "getservbyname");
return 0;
}
Reported by Pirmin Walthert
http://lists.uclibc.org/pipermail/uclibc/2010-August/044277.html
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/misc/ttyent/getttyent.c')
0 files changed, 0 insertions, 0 deletions