summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorFrancesco Potortì <pot@gnu.org>2002-06-05 12:10:26 +0000
committerFrancesco Potortì <pot@gnu.org>2002-06-05 12:10:26 +0000
commit50496bd978159deaa1f18136e25eb7b5ae1043f2 (patch)
treeda4c9f4c8b02dd533e2e655a3b0ea06b24fa798e /lib-src
parent382f558bf2d31a5520963626ff4c05dbc7d1ec17 (diff)
downloademacs-50496bd978159deaa1f18136e25eb7b5ae1043f2.tar.gz
(main): Avoid a buffer overrun with sprintf.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ChangeLog6
-rw-r--r--lib-src/etags.c8
2 files changed, 9 insertions, 5 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 71ac022f1fa..9e5b38a417a 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,7 @@
+2002-06-05 Francesco Potorti` <pot@gnu.org>
+
+ * etags.c (main): Avoid a buffer overrun with sprintf.
+
2002-05-30 Richard M. Stallman <rms@gnu.org>
* Makefile.in (LIBS_MAIL): Renamed from LIB_MAIL.
@@ -22,7 +26,7 @@
* Makefile.in (${archlibdir}): Don't conditionalize on
HAVE_SHARED_GAME_DIR. Instead, test at installation time whether
or not we have access to the specified game user.
-
+
* update-game-score.c (SCORE_FILE_PREFIX): Delete.
(main): New argument -d, for specifying directory.
(usage): Document.
diff --git a/lib-src/etags.c b/lib-src/etags.c
index b6f1c1b6ce1..b21175e21c2 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -33,7 +33,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
* Francesco Potortì <pot@gnu.org> has maintained it since 1993.
*/
-char pot_etags_version[] = "@(#) pot revision number is 15.16";
+char pot_etags_version[] = "@(#) pot revision number is $Revision: 15.18 $";
#define TRUE 1
#define FALSE 0
@@ -441,7 +441,7 @@ static bool constantypedefs; /* -d: create tags for C #define, enum */
static bool globals; /* create tags for global variables */
static bool declarations; /* --declarations: tag them and extern in C&Co*/
static bool members; /* create tags for C member variables */
-static bool no_line_directive; /* ignore #line directives */
+static bool no_line_directive; /* ignore #line directives (undocumented) */
static bool update; /* -u: update tags */
static bool vgrind_style; /* -v: create vgrind style index output */
static bool no_warnings; /* -w: suppress warnings */
@@ -1254,8 +1254,8 @@ main (argc, argv)
if (update)
{
- char cmd[BUFSIZ];
- sprintf (cmd, "sort -o %s %s", tagfile, tagfile);
+ char cmd[2*BUFSIZ+10];
+ sprintf (cmd, "sort -o %.*s %.*s", BUFSIZ, tagfile, BUFSIZ, tagfile);
exit (system (cmd));
}
return GOOD;