File pinfo-0.6.9-nul-strings.patch of Package pinfo

Index: src/filehandling_functions.c
===================================================================
--- src/filehandling_functions.c.orig
+++ src/filehandling_functions.c
@@ -311,6 +311,11 @@ read_item(FILE * id, char **type, char *
 				i--;
 			}
 		}
+	        if (!Buf[Lines][0]) {
+ 	        	/* skip those ^@^H[index lines (^@ = NUL) */
+ 	      		xfree(Buf[Lines]);
+ 	      		Lines--;
+       		}
 	}
 	while (Buf[Lines][0] != INFO_TAG);	/* repeat until new node mark is found */
 
Index: src/video.c
===================================================================
--- src/video.c.orig
+++ src/video.c
@@ -92,6 +92,12 @@ showscreen(char **message, char *type, l
 
 		if (!message[i]) continue;
 		tmp = strlen(message[i]) - 1;
+		if (tmp < 0) {
+			fprintf(stderr,
+				"%s:%d: BUG: strlen(message[%d]) == 0; please report!\n",
+				__FILE__, __LINE__, i);
+	 		tmp = 0;
+		}
 		message[i][tmp] = 0;
 		if (tmp>column)
 			mvaddstr(i + 1 - pos, 0, message[i]+column);