Hi,
I am trying to build
libtasn1-4.9 in ubuntu18.04 LTS OS. I am getting below error during compilation of code(i.e. make). Could you please help me to resolve this issue ?
e[3]: Entering directory '/usr/local/src/libtasn1-4.9/lib'
CC ASN1.lo
ASN1.c: In function '_asn1_yyparse':
ASN1.y:152:47: error: '__builtin___snprintf_chk' output may be truncated before the last format character [-Werror=format-truncation=]
neg_num : '-' NUM {snprintf($$,sizeof($$),"-%s",$2);}
^~~~~
In file included from /usr/include/stdio.h:862:0,
from ./int.h:31,
from ASN1.y:30:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: '__builtin___snprintf_chk' output between 2 and 66 bytes into a destination of size 65
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ASN1.y:164:47: error: '__builtin___snprintf_chk' output may be truncated before the last format character [-Werror=format-truncation=]
| '-' NUM {snprintf($$,sizeof($$),"-%s",$2);}
^~~~~
In file included from /usr/include/stdio.h:862:0,
from ./int.h:31,
from ASN1.y:30:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: '__builtin___snprintf_chk' output between 2 and 66 bytes into a destination of size 65
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Makefile:1112: recipe for target 'ASN1.lo' failed
make[3]: *** [ASN1.lo] Error 1
make[3]: Leaving directory '/usr/local/src/libtasn1-4.9/lib'
Makefile:1176: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/usr/local/src/libtasn1-4.9/lib'
Makefile:1009: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/usr/local/src/libtasn1-4.9'
Makefile:941: recipe for target 'all' failed
make: *** [all] Error 2