summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2007-11-20 03:05:12 +0000
committerStanislav Malyshev <stas@php.net>2007-11-20 03:05:12 +0000
commit0cf5a9e521d871de9058f22ee9f6869fbea9bd3f (patch)
tree97fdec2060134243203cf885c3718569166c6408
parent6c3beee05db2aee887cdee73720131ecd4faf1de (diff)
downloadphp-git-0cf5a9e521d871de9058f22ee9f6869fbea9bd3f.tar.gz
fix crash with bad parameters
-rw-r--r--main/output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/output.c b/main/output.c
index 2ced9c3461..d7294b6e25 100644
--- a/main/output.c
+++ b/main/output.c
@@ -432,10 +432,10 @@ static int php_ob_init_named(uint initial_size, uint block_size, char *handler_n
}
zend_stack_push(&OG(ob_buffers), &OG(active_ob_buffer), sizeof(php_ob_buffer));
}
+ OG(active_ob_buffer).buffer = (char *) emalloc(initial_size+1);
OG(ob_nesting_level)++;
OG(active_ob_buffer).block_size = block_size;
OG(active_ob_buffer).size = initial_size;
- OG(active_ob_buffer).buffer = (char *) emalloc(initial_size+1);
OG(active_ob_buffer).text_length = 0;
OG(active_ob_buffer).output_handler = output_handler;
OG(active_ob_buffer).chunk_size = chunk_size;