Fix minor bugs
This commit is contained in:
parent
29fb080a2b
commit
bddfdb1397
@ -1,6 +1,7 @@
|
||||
2018-04-20
|
||||
- Fix bug in sorting when guessing flow direction. Issue #92
|
||||
- Update nfdump.1 man page for xsrcport & xdstport aggregations. Request #109
|
||||
- Fix minor bugs
|
||||
|
||||
2018-04-01
|
||||
- Add program exit in nfx.c after panic with correupt data file
|
||||
|
@ -1607,7 +1607,7 @@ term: ANY { /* this is an unconditionally true expression, as a filter applies i
|
||||
uint64_t mask;
|
||||
uint32_t offset, shift;
|
||||
char *s = &$2[5];
|
||||
if ( s == '\0' ) {
|
||||
if ( *s == '\0' ) {
|
||||
yyerror("Missing label number");
|
||||
YYABORT;
|
||||
}
|
||||
@ -1678,7 +1678,7 @@ term: ANY { /* this is an unconditionally true expression, as a filter applies i
|
||||
uint64_t mask;
|
||||
uint32_t offset, shift;
|
||||
char *s = &$2[3];
|
||||
if ( s == '\0' ) {
|
||||
if ( *s == '\0' ) {
|
||||
yyerror("Missing label number");
|
||||
YYABORT;
|
||||
}
|
||||
|
@ -2389,7 +2389,7 @@ static void String_Flags(master_record_t *r, char *string) {
|
||||
|
||||
// if record contains unusuall flags, print the flags in hex as 0x.. number
|
||||
if ( r->tcp_flags > 63 ) {
|
||||
snprintf(string, 7, " 0x%2x\n", r->tcp_flags );
|
||||
snprintf(string, 7, " 0x%2x", r->tcp_flags );
|
||||
} else {
|
||||
string[0] = r->tcp_flags & 32 ? 'U' : '.';
|
||||
string[1] = r->tcp_flags & 16 ? 'A' : '.';
|
||||
|
@ -1053,6 +1053,11 @@ char Ident[IDENTLEN];
|
||||
print_format = DefaultMode;
|
||||
}
|
||||
|
||||
// limit input chars
|
||||
if ( strlen(print_format) > 512 ) {
|
||||
LogError("Length of ouput format string too big - > 512\n");
|
||||
exit(255);
|
||||
}
|
||||
if ( strncasecmp(print_format, "fmt:", 4) == 0 ) {
|
||||
// special user defined output format
|
||||
char *format = &print_format[4];
|
||||
|
Loading…
x
Reference in New Issue
Block a user