Use of getenv() without checking for NULL in processLine()
processLine() in maptemplate.c uses getenv() to read some env. variables and uses the value without checking whether the returned value is NULL:
snprintf(repstr, PROCESSLINE_BUFLEN, "%s", getenv("HTTP_HOST"));
outstr = msReplaceSubstring(outstr, "[host]", repstr);
snprintf(repstr, PROCESSLINE_BUFLEN, "%s", getenv("SERVER_PORT"));
outstr = msReplaceSubstring(outstr, "[port]", repstr);
Change History
(3)
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
Fixed in r7632. Getenv() output doesn't need to be free'd does it?
Steve