API: C: Check nullptr in icsneo_serialStringToNum
Otherwise it will implicitly call the std::string constructor and that constructor does not check nullptr.pull/35/head
parent
f3e456e7ea
commit
a43c0117d6
|
|
@ -84,6 +84,9 @@ bool icsneo_serialNumToString(uint32_t num, char* str, size_t* count) {
|
|||
}
|
||||
|
||||
uint32_t icsneo_serialStringToNum(const char* str) {
|
||||
if(!str)
|
||||
return 0;
|
||||
|
||||
return Device::SerialStringToNum(str);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue