#! /bin/sh /usr/share/dpatch/dpatch-run ## wrong_access_cmap_sig_max_array.dpatch by ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: fix wrong char arrray handling on CMap_parse_check_sig() @DPATCH@ diff -Nru dvipdfmx-20080607.orig/src/cmap_read.c dvipdfmx-20080607/src/cmap_read.c --- dvipdfmx-20080607.orig/src/cmap_read.c 2008-05-29 19:40:29.000000000 +0900 +++ dvipdfmx-20080607/src/cmap_read.c 2009-05-05 23:03:44.000000000 +0900 @@ -510,7 +510,7 @@ if (fread(sig, sizeof(char), CMAP_SIG_MAX, fp) != CMAP_SIG_MAX) result = -1; else { - sig[CMAP_SIG_MAX+1] = 0; + sig[CMAP_SIG_MAX] = 0; if (strncmp(sig, "%!PS", 4)) result = -1; else if (strstr(sig+4, "Resource-CMap"))