suricata
suricata copied to clipboard
smtp: Prevent error messages on packet path
Continuation of #11520
Issue: 7126
This commit abandons the use of StringParseUint32 which generates an error message of there are non-numeric characters.
The SMTP parser had used this function on the packet path; this commit uses ByteExtractStringUint32
instead.
An example of the content causing the error message to be emitted:
3460 LAST
Link to ticket: https://redmine.openinfosecfoundation.org/issues/7126
Describe changes:
- Use
ByteExtractStringUint32
instead ofStringParseUint32
function that emits error messages
Updates:
- Commit message update explaining why strtoul must clear errno before invoking it.
- Added s-v test
Provide values to any of the below to override the defaults.
- To use an LibHTP, Suricata-Verify or Suricata-Update pull request,
link to the pull request in the respective
_BRANCH
variable. - Leave unused overrides blank or remove.
SV_REPO= SV_BRANCH=https://github.com/OISF/suricata-verify/pull/2010 SU_REPO= SU_BRANCH= LIBHTP_REPO= LIBHTP_BRANCH=