Christopher Browne cbbrowne
Mon Sep 26 22:39:17 PDT 2005
Ian Burrell <ianburrell at gmail.com> writes:
> I just ran into a bug which crashes slonik when it is passed a file
> which doesn't exist.  It looks like it was fixed on HEAD as part of
> revision 1.43 on src/slonik/slonik.c.  There are other changes in that
> revision so I have extracted the relevant patch and appended it.  It
> looks like it could be applied separately.
>
>  - Ian
>
> --- src/slonik/slonik.c 25 May 2005 16:16:02 -0000      1.42
> +++ src/slonik/slonik.c 29 Jun 2005 01:48:15 -0000      1.43
> @@ -101,6 +200,11 @@
>                         FILE       *fp;
>
>                         fp = fopen(argv[optind], "r");
> +                       if (fp == NULL)
> +                       {
> +                               printf("could not open file '%s'\n",
> argv[optind]);
> +                               return -1;
> +                       }
>                         scan_new_input_file(fp);
>                         current_file = (char *)argv[optind++];
>                         yylineno = 1;

That seems a reasonable change to apply.  It's not a BIG thing, but
it's fairly obvious that the scan will then fail.

Thanks!
-- 
output = reverse("ofni.sailifa.ac" "@" "enworbbc")
<http://dev6.int.libertyrms.com/>
Christopher Browne
(416) 673-4124 (land)


More information about the Slony1-general mailing list