httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <>
Subject apreq_param with uploads
Date Wed, 02 Jun 2004 02:00:31 GMT
I've bumped into this one by accident and it is related to calling apreq_param()
on something that is an upload (i.e. a file passed through
multipart/form-data). If apreq_param() is called on such a parameter name, the
pointer returned by the call will be invalid (literally, value 0x3), causing a
segfault on access. I'm guessing that although "val" is not NULL on return in
that function, the pointer arithmetic in apreq_strtoval() and
apreq_value_to_param() macros may contribute to the eventual invalid pointer

I'm not sure if this should be fixed by calling apreq_upload() on any such
parameters from apreq_parem(), or just documented that one needs to call
apreq_upload() or apreq_uploads() first to actually generate those values,
which then avoids the invalid pointer and the segfault.


View raw message