Skip to content

Commit 80f6a98

Browse files
author
=
committed
improved COUNTRY IE-TAG detection
1 parent 5590199 commit 80f6a98

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

hcxpcapngtool.c

+6-3
Original file line numberDiff line numberDiff line change
@@ -3265,9 +3265,12 @@ while(0 < infolen)
32653265
{
32663266
if((tagok & TAG_COUNTRY_OK) == 0)
32673267
{
3268-
zeiger->country[0] = tagptr->data[0];
3269-
zeiger->country[1] = tagptr->data[1];
3270-
tagok |= TAG_COUNTRY_OK;
3268+
if((tagptr->data[0] >= 'A') && (tagptr->data[0] <= 'Z') && (tagptr->data[1] >= 'A') && (tagptr->data[1] <= 'Z'))
3269+
{
3270+
zeiger->country[0] = tagptr->data[0];
3271+
zeiger->country[1] = tagptr->data[1];
3272+
tagok |= TAG_COUNTRY_OK;
3273+
}
32713274
}
32723275
}
32733276
}

0 commit comments

Comments
 (0)