diff options
| author | Tatsuo Ishii | 2012-11-15 23:09:08 +0000 |
|---|---|---|
| committer | Tatsuo Ishii | 2012-11-15 23:18:24 +0000 |
| commit | 2849e70adb5f3b1e4328604254801738b224215d (patch) | |
| tree | e2f6ff9e7db69fe18eaa4b8603e6cf6e8d4cc98d | |
| parent | 44d184d08a0a97cde0834ae4d041b4a8fbc17f74 (diff) | |
Fix pool_send_severity_message() not to use uninitialized memory.V2_3_STABLE
Reported in Bug#33's attached valgrind output:
==20875== Syscall param write(buf) points to uninitialised byte(s)
==20875== at 0x52680D0: __write_nocancel (syscall-template.S:82)
==20875== by 0x41CC49: pool_flush_it (pool_stream.c:436)
==20875== by 0x41CCF8: pool_flush (pool_stream.c:496)
==20875== by 0x417AE4: pool_send_severity_message (pool_process_query.c:1722)
==20875== by 0x417C12: pool_send_error_message (pool_process_query.c:1608)
==20875== by 0x4182A0: read_kind_from_backend (pool_process_query.c:3768)
==20875== by 0x449098: ProcessBackendResponse (pool_proto_modules.c:2562)
==20875== by 0x41B9C4: pool_process_query (pool_process_query.c:274)
==20875== by 0x40B1DF: do_child (child.c:362)
==20875== by 0x404BD4: fork_a_child (main.c:1243)
==20875== by 0x40795B: main (main.c:661)
==20875== Address 0x87cb243 is 275 bytes inside a block of size 8,192 alloc'd
==20875== at 0x4C244E8: malloc (vg_replace_malloc.c:236)
==20875== by 0x41CEF4: pool_open (pool_stream.c:68)
==20875== by 0x40A7B2: do_accept (child.c:784)
==20875== by 0x40AA2A: do_child (child.c:185)
==20875== by 0x404BD4: fork_a_child (main.c:1243)
==20875== by 0x40795B: main (main.c:661)
| -rw-r--r-- | pool_process_query.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pool_process_query.c b/pool_process_query.c index 68674552c..0c6136893 100644 --- a/pool_process_query.c +++ b/pool_process_query.c @@ -2254,6 +2254,7 @@ void pool_send_severity_message(POOL_CONNECTION *frontend, int protoMajor, int sendlen; len = 0; + memset(data, 0, MAXDATA); pool_write(frontend, "E", 1); |
