Index: grep/src/search.c
diff -u grep/src/search.c:1.38 grep/src/search.c:1.39
--- grep/src/search.c:1.38 Thu Nov 10 19:57:54 2005
+++ grep/src/search.c Fri Nov 11 10:21:25 2005
@@ -627,9 +627,11 @@
char const *p;
char const *pnul;
- /* FIXME: Remove this restriction. */
+ /* FIXME: Remove these restrictions. */
if (eolbyte != '\n')
error (2, 0, _("The -P and -z options cannot be combined"));
+ if (memchr(pattern, '\n', size))
+ error (2, 0, _("The -P option only supports a single pattern"));
*n = '\0';
if (match_lines)