-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Warnint util 4516 v12.1 #7470
Warnint util 4516 v12.1 #7470
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7470 +/- ##
==========================================
+ Coverage 75.71% 75.73% +0.01%
==========================================
Files 655 655
Lines 188391 188399 +8
==========================================
+ Hits 142635 142676 +41
+ Misses 45756 45723 -33
Flags with carried forward coverage won't be shown. Click here to find out more. |
ERROR: ERROR: QA failed on report_failure. ERROR: QA failed on tlpr1_asan_suri. Pipeline 7671 |
QA triggers debug assertion at detect-engine-content-inspection.c:531 (oops) |
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.
Requested separate commits in a few places, the rest can be in a single commit
if (cd->flags & DETECT_CONTENT_DISTANCE && cd->distance > 0) { | ||
dist = cd->distance; | ||
SCLogDebug("distance to add: %u. depth + dist %u", dist, depth + dist); | ||
} | ||
SCLogDebug("depth %u + cd->within %u", depth, cd->within); | ||
depth = cd->depth = depth + cd->within + dist; | ||
if (depth + cd->within + dist < 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.
I would like these to go into their own commit
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.
ok, looks relevant
@@ -231,7 +231,11 @@ static int DetectAppLayerEventParseAppP2(DetectAppLayerEventData *data, | |||
return -3; | |||
} | |||
} | |||
data->event_id = event_id; | |||
if (event_id > UINT8_MAX) { | |||
SCLogWarning(SC_ERR_INVALID_SIGNATURE, "app-layer-event keyword's id has invalid value"); |
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.
new error/warning condition, would like a separate commit here
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.
ok
@@ -1150,7 +1149,8 @@ static bool DetectRunTxInspectRule(ThreadVars *tv, | |||
TRACE_SID_TXS(s->id, tx, "engine %p match %d", engine, match); | |||
if (engine->stream) { | |||
can->stream_stored = true; | |||
can->stream_result = match; | |||
// TODO change Callback prototype ? |
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.
yes I think that makes sense, also in a separate commit
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.
that makes a big commit...
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.
(done in next version)
@@ -1021,7 +1021,7 @@ typedef struct HttpReassembledBody_ { | |||
typedef struct SignatureNonPrefilterStore_ { | |||
SigIntId id; | |||
SignatureMask mask; | |||
uint8_t alproto; | |||
AppProto alproto; |
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.
does this change the size of the struct? guess not if AppProto
is uint16_t, but if it is an enum it would
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.
typedef uint16_t AppProto;
;-)
Replaced by #7490 |
Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/4516
Describe changes:
-Wimplicit-int-conversion
for detect*Final part of #7006 after #7351
Then remains only detect files to fix
Should this be split in multiple commits ?