]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Reset bufpos to 0 immediately after refilling the buffer. Otherwise, we
authordes <des@FreeBSD.org>
Wed, 16 Dec 2015 09:17:07 +0000 (09:17 +0000)
committerdes <des@FreeBSD.org>
Wed, 16 Dec 2015 09:17:07 +0000 (09:17 +0000)
commitf487c94c08bac0f4959d84ed0dc62e5ecd215aee
tree36ea2cf0bc84393cf3cfe58ee80c6c737bf3100c
parentb2f446313468f5dd643849b55606deda0852499b
Reset bufpos to 0 immediately after refilling the buffer.  Otherwise, we
risk leaving the connection in an indeterminate state if the server fails
to send a chunk delimiter.  Depending on the application and on the sizes
of the preceding chunks, the result can be anything from missing data to a
segfault.  With this patch, it will be reported as a protocol error.

PR: 204771
MFC after: 1 week
lib/libfetch/http.c