New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pdb parsing fixes + typos #7997
Conversation
libr/bin/pdb/pdb.c
Outdated
return 0; | ||
} | ||
if (num_streams<0 || tmp_data_max_size <= 0) { | ||
R_FREE(data); | ||
eprintf ("too much amount of streams\n" | ||
"curremt pdb file is not correct\n"); | ||
eprintf ("Too many streams: " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this fits in 1 line :P
libr/bin/pdb/pdb.c
Outdated
@@ -136,21 +136,21 @@ static int init_pdb7_root_stream(R_PDB *pdb, int *root_page_list, int pages_amou | |||
data_end = data + tmp_data_max_size; | |||
if (tmp_data_max_size> data_size) { | |||
R_FREE(data); | |||
eprintf ("invalid max tmp data size\n"); | |||
eprintf ("Invalid max tmp data size.\n"); | |||
return 0; | |||
} | |||
if (num_streams<0 || tmp_data_max_size <= 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing spaces around <, maybe throw an r2-indent here?
libr/bin/pdb/pdb.c
Outdated
@@ -176,37 +176,41 @@ static int init_pdb7_root_stream(R_PDB *pdb, int *root_page_list, int pages_amou | |||
if ((pos + num_pages) > tmp_data_max_size) { | |||
R_FREE(data); | |||
R_FREE(sizes); | |||
eprintf("warning: looks like there is not correct values " | |||
"of stream size in pdb file\n"); | |||
eprintf ("Warning: looks like there is no correct values " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one line
libr/bin/pdb/pdb.c
Outdated
memset(tmp, 0, num_pages * 4); | ||
ut32 size = num_pages * 4; | ||
tmp = (char *) malloc (size); | ||
memset(tmp, 0, size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check for null ptr and use calloc to avoid the memset
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also missing space before (
lgtm |
Yes ? |
fix the conflict |
ah yy ofc |
This should fix #6434
Here is (part of) the output now: