1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

* version.c (scm_version): use sprintf instead of snprintf,

for portability.  thanks to Bill Schottstaedt.
This commit is contained in:
Gary Houston 2001-10-14 21:28:23 +00:00
parent 4f522b6f5c
commit 8186c4f536
2 changed files with 11 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2001-10-14 Gary Houston <ghouston@arglist.com>
* version.c (scm_version): use sprintf instead of snprintf,
for portability. thanks to Bill Schottstaedt.
2001-10-14 Mikael Djurfeldt <mdj@linnaeus>
* read.c (scm_lreadr): When user-defined hash procedure returns

View file

@ -106,9 +106,13 @@ SCM_DEFINE (scm_version, "version", 0, 0, 0,
#define FUNC_NAME s_scm_version
{
char version_str[64];
char version_str[3 * 4 + 3];
snprintf(version_str, sizeof(version_str), "%d.%d.%d",
#if SCM_GUILE_MAJOR_VERSION > 9999 || SCM_GUILE_MINOR_VERSION > 9999 \
|| SCM_GUILE_MICRO_VERSION > 9999
# error version string may overflow buffer
#endif
sprintf (version_str, "%d.%d.%d",
SCM_GUILE_MAJOR_VERSION,
SCM_GUILE_MINOR_VERSION,
SCM_GUILE_MICRO_VERSION);