source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* texi2mdoc: Protect against too many nested values.
@ 2015-02-21 22:02 kristaps
  0 siblings, 0 replies; only message in thread
From: kristaps @ 2015-02-21 22:02 UTC (permalink / raw)
  To: source

Log Message:
-----------
Protect against too many nested values.
Convert texiabort() (needs an errno) to texierr().

Modified Files:
--------------
    texi2mdoc:
        main.c
        util.c

Revision Data
-------------
Index: main.c
===================================================================
RCS file: /home/cvs/mdocml/texi2mdoc/main.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -Lmain.c -Lmain.c -u -p -r1.28 -r1.29
--- main.c
+++ main.c
@@ -1014,6 +1014,8 @@ dovalue(struct texi *p, enum texicmd cmd
 					break;
 			if (i < p->valstackpos)
 				texierr(p, "recursive value");
+			if (64 == p->valstackpos) 
+				texierr(p, "too many nested values");
 			p->valstack[p->valstackpos++] = cp;
 			parseeof(p, cp, strlen(cp));
 			p->valstackpos--;
Index: util.c
===================================================================
RCS file: /home/cvs/mdocml/texi2mdoc/util.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lutil.c -Lutil.c -u -p -r1.5 -r1.6
--- util.c
+++ util.c
@@ -778,7 +778,7 @@ parsefile(struct texi *p, const char *fn
 	size_t		 i;
 
 	if (64 == p->filepos) 
-		texiabort(p, "too many open files");
+		texierr(p, "too many open files");
 	f = &p->files[p->filepos];
 	memset(f, 0, sizeof(struct texifile));
 
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-02-21 22:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-21 22:02 texi2mdoc: Protect against too many nested values kristaps

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).