You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (framelen > sizeof(tnc2buf) - 80) {
/* Too much ! Too much! */
return 0;
}
where tnc2buf is a function parameter char *tnc2buf. sizeof() has 'unsigned int' type, in a 32-bit binary, sizeof(char *) is 4U so this test re-writes
as:
if (framelen > 4U - 80U) {
which simplifies to:
if (framelen > 4294967224) {
Which I'll say is too much! too much! but sadly has nothing to do with the size of the supplied tnc2buf. Perhaps this test yearns to be:
if (framelen > tnc2buflen) {
The text was updated successfully, but these errors were encountered:
Lines 148-153 of ax25.c are:
where tnc2buf is a function parameter char *tnc2buf. sizeof() has 'unsigned int' type, in a 32-bit binary, sizeof(char *) is 4U so this test re-writes
as:
if (framelen > 4U - 80U) {
which simplifies to:
if (framelen > 4294967224) {
Which I'll say is too much! too much! but sadly has nothing to do with the size of the supplied tnc2buf. Perhaps this test yearns to be:
The text was updated successfully, but these errors were encountered: