projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
fbe633a
)
fix bug#15495 HttpMessage::setHttpVersion segfault
author
Michael Wallner
<mike@php.net>
Mon, 12 Jan 2009 09:43:06 +0000
(09:43 +0000)
committer
Michael Wallner
<mike@php.net>
Mon, 12 Jan 2009 09:43:06 +0000
(09:43 +0000)
http_message_object.c
patch
|
blob
|
history
diff --git
a/http_message_object.c
b/http_message_object.c
index d01c256ed32e3efd63977f548b38760f48341c74..81f31a409fdb9d46350e3707d3321f07302bbc82 100644
(file)
--- a/
http_message_object.c
+++ b/
http_message_object.c
@@
-1132,9
+1132,9
@@
PHP_METHOD(HttpMessage, setHttpVersion)
}
convert_to_double(zv);
- s
printf(v, "%1.1l
f", Z_DVAL_P(zv));
+ s
nprintf(v, sizeof(v), "%1.1
f", Z_DVAL_P(zv));
if (strcmp(v, "1.0") && strcmp(v, "1.1")) {
- http_error_ex(HE_WARNING, HTTP_E_INVALID_PARAM, "Invalid HTTP protocol version (1.0 or 1.1): %
s", v
);
+ http_error_ex(HE_WARNING, HTTP_E_INVALID_PARAM, "Invalid HTTP protocol version (1.0 or 1.1): %
g", Z_DVAL_P(zv)
);
RETURN_FALSE;
}