You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also may worth noting that in case the user gets SMBERR_INVALID_DATA or SMBERR_UNKNOWN_TYPE during the call of smbios_next(), that may not be a good reason to stop iterating (unlike the sample code suggests). As far as I can see, the code can safely continue iterating.
Let me know if I misunderstood anything :)
Thanks in advance!
The text was updated successfully, but these errors were encountered:
I recently refactored the code but didn't provide enough documentation at the time. I updated the code and the readme now.
Regarding the crash, could you provide the SMBIOS data causing it? If you can't or prefer not to, I can also work with a stack trace pinpointing the error (e.g. from gdb). I just merged a change that includes some validations during data parsing, which may solve your issue.
The error SMBERR_UNKNOWN_TYPE was no longer used and I removed it from the header file. The code will return SMBERR_OK even for unknown entries, as these can still be read with the rawdata field.
The error SMBERR_INVALID_DATA is returned when it's impossible or difficult to recover from invalid data (e.g. missing important information or a terminator). If you have a specific case, I can look into it and see if there's a simple solution to recover from it.
https://github.com/brunexgeek/smbios-parser/blob/master/smbios.c#L651
This should be:
SMBERR_UNKNOWN_TYPE
Also may worth noting that in case the user gets SMBERR_INVALID_DATA or SMBERR_UNKNOWN_TYPE during the call of smbios_next(), that may not be a good reason to stop iterating (unlike the sample code suggests). As far as I can see, the code can safely continue iterating.
Let me know if I misunderstood anything :)
Thanks in advance!
The text was updated successfully, but these errors were encountered: