FreeBSD Bugzilla – Attachment 173919 Details for
Bug 212033
fgetwln(3) fails to report most encoding errors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to stdio/fgetwln.c to make fgetwln(3) fail on fgetwc(3) failure.
tmp.patch (text/plain), 809 bytes, created by
Ingo Schwarze
on 2016-08-21 21:33:24 UTC
(
hide
)
Description:
Patch to stdio/fgetwln.c to make fgetwln(3) fail on fgetwc(3) failure.
Filename:
MIME Type:
Creator:
Ingo Schwarze
Created:
2016-08-21 21:33:24 UTC
Size:
809 bytes
patch
obsolete
>Index: stdio/fgetwln.c >=================================================================== >RCS file: /cvs/src/lib/libc/stdio/fgetwln.c,v >retrieving revision 1.1 >diff -p -U11 -r1.1 fgetwln.c >--- stdio/fgetwln.c 12 Jan 2015 20:58:07 -0000 1.1 >+++ stdio/fgetwln.c 21 Aug 2016 14:00:32 -0000 >@@ -59,23 +59,23 @@ fgetwln(FILE * __restrict fp, size_t *le > > len = 0; > while ((wc = __fgetwc_unlock(fp)) != WEOF) { > #define GROW 512 > if (len >= fp->_lb._size / sizeof(wchar_t) && > __slbexpand(fp, len + GROW)) > goto error; > *((wchar_t *)fp->_lb._base + len++) = wc; > if (wc == L'\n') > break; > } >- if (len == 0) >+ if (len == 0 || fp->_flags & __SERR) > goto error; > > FUNLOCKFILE(fp); > *lenp = len; > return (wchar_t *)fp->_lb._base; > > error: > FUNLOCKFILE(fp); > *lenp = 0; > return NULL; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 212033
: 173919