Skip to content

add NULL pointer check in util.c#1706

Merged
Cyan4973 merged 1 commit intofacebook:devfrom
LeeYoung624:dev
Aug 5, 2019
Merged

add NULL pointer check in util.c#1706
Cyan4973 merged 1 commit intofacebook:devfrom
LeeYoung624:dev

Conversation

@LeeYoung624
Copy link
Copy Markdown
Contributor

@LeeYoung624 LeeYoung624 commented Jul 29, 2019

I believe the original code was meant to deal with case that /proc/cpuinfo has come across a error: the formatting of /proc/cpuinfo was broken. In that way, the sep could also be NULL because it's the return of strchr.
I think adding a NULL check is better here.

@Cyan4973
Copy link
Copy Markdown
Contributor

Good point @LeeYoung624 !

@Cyan4973 Cyan4973 self-assigned this Aug 4, 2019
@Cyan4973 Cyan4973 merged commit 2635107 into facebook:dev Aug 5, 2019
@felixhandte felixhandte mentioned this pull request Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants