projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
abcc2b0
)
Fix error handling in server_content_type()
author
Fabian Keil
<fk@fabiankeil.de>
Sat, 18 Oct 2014 11:30:56 +0000
(11:30 +0000)
committer
Fabian Keil
<fk@fabiankeil.de>
Sat, 18 Oct 2014 11:30:56 +0000
(11:30 +0000)
CID 66369.
parsers.c
patch
|
blob
|
history
diff --git
a/parsers.c
b/parsers.c
index
219a6cf
..
4111996
100644
(file)
--- a/
parsers.c
+++ b/
parsers.c
@@
-1,4
+1,4
@@
-const char parsers_rcs[] = "$Id: parsers.c,v 1.29
3 2014/10/18 11:24:3
4 fabiankeil Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 1.29
4 2014/10/18 11:30:0
4 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/parsers.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/parsers.c,v $
@@
-2195,11
+2195,12
@@
static jb_err server_content_type(struct client_state *csp, char **header)
*/
if ((csp->content_type & CT_TEXT) || (csp->action->flags & ACTION_FORCE_TEXT_MODE))
{
*/
if ((csp->content_type & CT_TEXT) || (csp->action->flags & ACTION_FORCE_TEXT_MODE))
{
+ jb_err err;
freez(*header);
*header = strdup_or_die("Content-Type: ");
freez(*header);
*header = strdup_or_die("Content-Type: ");
- string_append(header, csp->action->string[ACTION_STRING_CONTENT_TYPE]);
- if (header == NULL)
+ err = string_append(header, csp->action->string[ACTION_STRING_CONTENT_TYPE]);
+ if (JB_ERR_OK != err)
{
log_error(LOG_LEVEL_HEADER, "Insufficient memory to replace Content-Type!");
return JB_ERR_MEMORY;
{
log_error(LOG_LEVEL_HEADER, "Insufficient memory to replace Content-Type!");
return JB_ERR_MEMORY;