diff --git a/vr_exclude.c b/vr_exclude.c index 97e9033..6a82a3c 100644 --- a/vr_exclude.c +++ b/vr_exclude.c @@ -113,7 +113,7 @@ Vr_Exclude * vr_loadExcludeList (Vr_Exclude * list, const HChar * fname) { cline+LINE_SIZEMAX-1) { - VG_(umsg)("ERROR (parse)\n"); + VG_(umsg)("ERROR (parse) :%s \n",line); return list; } *c = 0; @@ -283,7 +283,7 @@ Vr_IncludeSource * vr_loadIncludeSourceList (Vr_IncludeSource * list, const HCha return list; } - SizeT nLine = 256; + SizeT nLine = LINE_SIZEMAX ; HChar *line = VG_(malloc)("vr.loadIncludeSources.1", nLine*sizeof(HChar)); Int lineno = 0; @@ -293,29 +293,29 @@ Vr_IncludeSource * vr_loadIncludeSourceList (Vr_IncludeSource * list, const HCha HChar* filename = line; // Skip non-blank characters for (c = line; - cline+255) { - VG_(umsg)("ERROR (parse1)\n"); + if (*c == 0 || c>line+LINE_SIZEMAX-1) { + VG_(umsg)("ERROR (parse1) : %s\n",line); return list; } *c = 0; // Skip blank characters for (++c; - cline+255) { - VG_(umsg)("ERROR (parse2)\n"); + if (c>line+LINE_SIZEMAX-1) { + VG_(umsg)("ERROR (parse2) : %s\n",line); return list; } if (*c==0) { - c = line + 256; + c = line + LINE_SIZEMAX; } else { *c = 0; ++c; @@ -324,7 +324,7 @@ Vr_IncludeSource * vr_loadIncludeSourceList (Vr_IncludeSource * list, const HCha // Skip blank characters for (; - c