nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] [PATCH] mhbuild: implement #on/#off/#pop, and the -[no]directives switch

2012-05-31 14:51:53
Hi Paul,

+static void directive_onoff(int onoff)
+{
+    if (directives_index >= sizeof(directives_stack)) {
+     fprintf(stderr, "mhbuild: #on/off overflow, continuing\n");
+     return;
+    }
+    directives_stack[++directives_index] = onoff;
+}

I think the test is wrong.  If 31 >= 32 is false so
directives_stack[++31] will be written to.

Cheers, Ralph.

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>