mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-18 16:53:50 +08:00
PR24938, Null Pointer Dereference in debug.c:debug_write_type
PR 24938 * debug.c (debug_write_type): Call empty_type for NULL type here.. (debug_write_type): ..rather than in just one case here.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2019-08-26 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
PR 24938
|
||||||
|
* debug.c (debug_write_type): Call empty_type for NULL type here..
|
||||||
|
(debug_write_type): ..rather than in just one case here.
|
||||||
|
|
||||||
2019-08-23 Nick Clifton <nickc@redhat.com>
|
2019-08-23 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
PR 24829
|
PR 24829
|
||||||
|
@ -2419,6 +2419,9 @@ debug_write_type (struct debug_handle *info,
|
|||||||
int is;
|
int is;
|
||||||
const char *tag = NULL;
|
const char *tag = NULL;
|
||||||
|
|
||||||
|
if (type == DEBUG_TYPE_NULL)
|
||||||
|
return (*fns->empty_type) (fhandle);
|
||||||
|
|
||||||
/* If we have a name for this type, just output it. We only output
|
/* If we have a name for this type, just output it. We only output
|
||||||
typedef names after they have been defined. We output type tags
|
typedef names after they have been defined. We output type tags
|
||||||
whenever we are not actually defining them. */
|
whenever we are not actually defining them. */
|
||||||
@ -2481,8 +2484,6 @@ debug_write_type (struct debug_handle *info,
|
|||||||
debug_error (_("debug_write_type: illegal type encountered"));
|
debug_error (_("debug_write_type: illegal type encountered"));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
case DEBUG_KIND_INDIRECT:
|
case DEBUG_KIND_INDIRECT:
|
||||||
if (*type->u.kindirect->slot == DEBUG_TYPE_NULL)
|
|
||||||
return (*fns->empty_type) (fhandle);
|
|
||||||
return debug_write_type (info, fns, fhandle, *type->u.kindirect->slot,
|
return debug_write_type (info, fns, fhandle, *type->u.kindirect->slot,
|
||||||
name);
|
name);
|
||||||
case DEBUG_KIND_VOID:
|
case DEBUG_KIND_VOID:
|
||||||
|
Reference in New Issue
Block a user