help-libtasn1
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

libtasn 1-4.13 dirty compile


From: Jeffrey Walton
Subject: libtasn 1-4.13 dirty compile
Date: Fri, 10 May 2019 14:08:36 -0400

Hi Everyone,

Just an FYI, no alarms... libtasn 1-4.13 is a bit dirty during its
compile with GCC 8.3 on Fedora 29.

If the buffers are known to be properly sized, then you may want to
consider adding a few extra bytes to keep the tools happy and quiet.
It will avoid years worth of mailing list messages like this. If they
are a bit small then you sidestepped the problem.

ASN1.c: In function '_asn1_yyparse':
ASN1.y:164:47: warning: 'snprintf' output may be truncated before the
last format character [-Wformat-truncation=]
                 | '-' NUM        {snprintf($$,sizeof($$),"-%s",$2);}
                                               ^~~~~
ASN1.y:164:6: note: 'snprintf' output between 2 and 66 bytes into a
destination of size 65
                 | '-' NUM        {snprintf($$,sizeof($$),"-%s",$2);}
      ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ASN1.y:152:47: warning: 'snprintf' output may be truncated before the
last format character [-Wformat-truncation=]
 neg_num : '-' NUM     {snprintf($$,sizeof($$),"-%s",$2);}
                                               ^~~~~
ASN1.y:152:6: note: 'snprintf' output between 2 and 66 bytes into a
destination of size 65
 neg_num : '-' NUM     {snprintf($$,sizeof($$),"-%s",$2);}
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

decoding.c: In function 'asn1_expand_any_defined_by':
decoding.c:1786:44: warning: 'snprintf' output may be truncated before
the last format character [-Wformat-truncation=]
         snprintf(name, sizeof(name), "%s.%s", definitionsName, p2->name);
                                            ^
decoding.c:1786:9: note: 'snprintf' output between 2 and 130 bytes
into a destination of size 129
         snprintf(name, sizeof(name), "%s.%s", definitionsName, p2->name);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
decoding.c:1802:45: warning: 'snprintf' output may be truncated before
the last format character [-Wformat-truncation=]
          snprintf(name, sizeof(name), "%s.%s", definitionsName, p2->name);
                                             ^
decoding.c:1802:10: note: 'snprintf' output between 2 and 130 bytes
into a destination of size 129
          snprintf(name, sizeof(name), "%s.%s", definitionsName, p2->name);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

structure.c: In function 'asn1_find_structure_from_oid':
structure.c:1113:46: warning: 'snprintf' output may be truncated
before the last format character [-Wformat-truncation=]
           snprintf(name, sizeof(name), "%s.%s", definitionsName, p->name);
                                              ^
structure.c:1113:11: note: 'snprintf' output between 2 and 130 bytes
into a destination of size 129
           snprintf(name, sizeof(name), "%s.%s", definitionsName, p->name);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]