mirror of
https://github.com/LIV2/bebbo-gcc.git
synced 2025-12-06 00:23:32 +00:00
refs #55: fix 2 NPEs
This commit is contained in:
parent
eaeca8737d
commit
ac6f3ad417
@ -1 +1 @@
|
||||
20190114085418
|
||||
20190115204428
|
||||
|
||||
@ -298,6 +298,9 @@ varpool_node::get_constructor (void)
|
||||
struct lto_in_decl_state *decl_state
|
||||
= lto_get_function_in_decl_state (file_data, decl);
|
||||
|
||||
if (!decl_state)
|
||||
return NULL;
|
||||
|
||||
data = lto_get_section_data (file_data, LTO_section_function_body,
|
||||
name, &len, decl_state->compressed);
|
||||
if (!data)
|
||||
|
||||
@ -115,8 +115,12 @@ readName (unsigned l, int descriptor, off_t * offset)
|
||||
nameLen = l;
|
||||
}
|
||||
if (!l)
|
||||
return 1;
|
||||
|
||||
{
|
||||
if (!name)
|
||||
name = XNEWVEC(unsigned char, 1);
|
||||
*name = 0;
|
||||
return 1;
|
||||
}
|
||||
int r = simple_object_internal_read (descriptor, *offset, name, l, &errmsg,
|
||||
&err);
|
||||
name[l] = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user