• Martin Blix Grydeland's avatar
    Fix buffer overflow in HTC_RxInit on workspace exhaustion · 4bcc1c21
    Martin Blix Grydeland authored
    HTC_RxInit could write a single '\0' NUL character outside of the
    workspace when its called and there is zero bytes left in the
    workspace. This would trigger the workspace canary causing subsequent
    assertion.
    
    Fix by releaving HTC_RxInit of adding the '\0' character.
    
    HTC_RxStuff now returns HTC_S_Overflow early if the available buffer
    space is zero. The '\0' character is inserted just before calling the
    completion check function.
    
    Also fix an off-by-one error on the http_{req|resp}_size calculations,
    where the maximum number of bytes accepted was one less than the
    paramter indicated. c00039.vtc and c00040.vtc has been edited to
    reflect that and to be more expressive about the sizes they generate.
    
    Fixes: #1834
    4bcc1c21
Name
Last commit
Last update
.github Loading commit data...
bin Loading commit data...
devscripts Loading commit data...
doc Loading commit data...
etc Loading commit data...
include Loading commit data...
lib Loading commit data...
m4 Loading commit data...
man Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
.syntastic_c_config Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING Loading commit data...
ChangeLog Loading commit data...
INSTALL Loading commit data...
LICENSE Loading commit data...
Makefile.am Loading commit data...
Makefile.inc.phk Loading commit data...
Makefile.phk Loading commit data...
README.Packaging Loading commit data...
README.rst Loading commit data...
autogen.des Loading commit data...
autogen.sh Loading commit data...
config.phk Loading commit data...
configure.ac Loading commit data...
flint.lnt Loading commit data...
varnish-legacy.m4 Loading commit data...
varnish.m4 Loading commit data...
varnishapi-uninstalled.pc.in Loading commit data...
varnishapi.pc.in Loading commit data...