projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
fix Bug #15497 HttpInflateStream::finish segfaults when passing NULL
[m6w6/ext-http]
/
http_message_object.c
diff --git
a/http_message_object.c
b/http_message_object.c
index b6b3aafcac271f5c12dd3305031618cdd1b875fb..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);
}
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")) {
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;
}
RETURN_FALSE;
}
@@
-1396,8
+1396,8
@@
PHP_METHOD(HttpMessage, unserialize)
if ((msg = http_message_parse_ex(obj->message, serialized, (size_t) length))) {
obj->message = msg;
} else {
if ((msg = http_message_parse_ex(obj->message, serialized, (size_t) length))) {
obj->message = msg;
} else {
- http_error(HE_ERROR, HTTP_E_RUNTIME, "Could not unserialize HttpMessage");
http_message_init(obj->message);
http_message_init(obj->message);
+ http_error(HE_ERROR, HTTP_E_RUNTIME, "Could not unserialize HttpMessage");
}
}
}
}
}
}