r93225 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93224‎ | r93225 | r93226 >
Date:17:46, 26 July 2011
Author:platonides
Status:ok
Tags:
Comment:
Error checking for pcre_compile() Should never happen given that the pattern is hardcoded.
Modified paths:
  • /trunk/debs/squid/redirector.c (modified) (history)

Diff [purge]

Index: trunk/debs/squid/redirector.c
@@ -75,6 +75,11 @@
7676 &erroffset, /* for error offset */
7777 NULL); /* use default character tables */
7878
 79+ if (!re) {
 80+ fprintf(stderr, "pcre_compile failed at offset %d: %s\n", erroffset, error);
 81+ exit(1);
 82+ }
 83+
7984 pe = pcre_study(re, 0, &error);
8085
8186 while(fgets(buff, MAX_BUFF, stdin) != NULL) {

Status & tagging log