You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-dev@httpd.apache.org by "Peterson, Scott" <Pe...@principal.com> on 2002/03/12 22:44:22 UTC
Win32 seg fault in ApacheRequest_parse_multipart
I'm running libapreq 1.0 with Apache 1.3.20 on Windows 2000. When I run the mod_testapreq file upload test, I get a seg fault when libapreq calls fwrite. Buff, blen, and upload->fp all look valid, so there's nothing obviously wrong with the parameters.
while ((blen = multipart_buffer_read(mbuff, buff, sizeof(buff)))) {
if (req->upload_hook != NULL) {
wlen = req->upload_hook(req->hook_data, buff, blen, upload);
} else {
wlen = fwrite(buff, 1, blen, upload->fp); **** FAULT ****
}
if (wlen != blen) {
return HTTP_INTERNAL_SERVER_ERROR;
}
upload->size += wlen;
}
I have to admit I didn't use the build system that came with libapreq. Instead, I built it with a homegrown VC++ project. The other mod_testapreq tests work fine. Any ideas what could be wrong?
Thanks!
Scott Peterson
Principal Financial Group