public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Fix for win32 core dumps parsing code
@ 2002-01-22 11:34 egor duda
  2002-01-26  3:03 ` Nick Clifton
  0 siblings, 1 reply; 2+ messages in thread
From: egor duda @ 2002-01-22 11:34 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 319 bytes --]

Hi!

  Cygwin contains an utility to produce core dumps in elf format.
These dumps can be later inspected by gdb. There's a possibility that
section sizes in code dump is bigger than gdb expects, in which case
parsing code crashes. Fix attached.

egor.            mailto:deo@logos-m.ru icq 5165414 fidonet 2:5020/496.19

[-- Attachment #2: win32-core-wrong-size-crash.diff --]
[-- Type: application/octet-stream, Size: 458 bytes --]

Index: elf.c
===================================================================
RCS file: /cvs/uberbaum/bfd/elf.c,v
retrieving revision 1.121
diff -u -p -2 -r1.121 elf.c
--- elf.c	2002/01/10 23:05:21	1.121
+++ elf.c	2002/01/15 11:50:18
@@ -6261,5 +6261,5 @@ elfcore_grok_win32pstatus (abfd, note)
     return true;
 
-  memcpy (&pstatus, note->descdata, note->descsz);
+  memcpy (&pstatus, note->descdata, sizeof (pstatus));
 
   switch (pstatus.data_type)

[-- Attachment #3: win32-core-wrong-size-crash.ChangeLog --]
[-- Type: application/octet-stream, Size: 149 bytes --]

2002-01-22  Egor Duda  <deo@logos-m.ru>

	* elf.c (elfcore_grok_win32pstatus): Copy only as much information
	as possible to avoid stack corruption.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Fix for win32 core dumps parsing code
  2002-01-22 11:34 Fix for win32 core dumps parsing code egor duda
@ 2002-01-26  3:03 ` Nick Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2002-01-26  3:03 UTC (permalink / raw)
  To: egor duda; +Cc: binutils

Hi Egor,

> 2002-01-22  Egor Duda  <deo@logos-m.ru>
> 
> 	* elf.c (elfcore_grok_win32pstatus): Copy only as much information
> 	as possible to avoid stack corruption.

Approved and applid.

Thanks for submitting this patch.

Cheers
        Nick

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-01-26 10:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-22 11:34 Fix for win32 core dumps parsing code egor duda
2002-01-26  3:03 ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).