Skip to content

Commit

Permalink
proto_hep: fix off by one comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Jun 10, 2019
1 parent bb072f6 commit 4703d29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/proto_hep/hep.c
Expand Up @@ -1580,7 +1580,7 @@ int add_hep_correlation(trace_message message, str* corr_name, str* corr_value)

_cJSON_AddStrToObject( root, corr_name, corr_value->s, corr_value->len);
} else {
if ( !memcmp( corr_name->s, "sip", sizeof("sip") ) ) {
if ( !memcmp( corr_name->s, "sip", sizeof("sip") - 1 ) ) {
/* we'll save sip correlation id as the actual correlation */
sip_correlation = pkg_malloc( sizeof(str) + corr_value->len );
if ( !sip_correlation ) {
Expand Down

0 comments on commit 4703d29

Please sign in to comment.