find function doesn't

Judd Montgomery judd at jpilot.org
Sun Jul 7 19:39:30 EDT 2002


Hi Ludovic,

I've already applied this patch to my CVS.  It shouldn't ever get 
executed however because on line 45 there is:

if ((!haystack) || (!needle)) return NULL;

Judd

Ludovic Rousseau wrote:
> Le samedi 06 juillet 2002 à 19:21:42, Judd Montgomery a écrit:
> 
>>I suspect it is an incompatiblity between the plugins and jpilot.  Try 
>>running jpilot -p to disable plugins and see if the problem goes away. 
>>Then we can go from there.
> 
> 
> In fact I suspect a bug in jpilot :-)
> 
> I corrected a similar bug a few weeks/months ago. The patch is in the
> Debian version and you can get it from the Debian page [1].
> Get the .diff.gz file.
> 
> Judd, can you review this .diff.gz file and include patches you feel
> confortable with?
> 
> extract:
> --- jpilot-0.99.2-cvs-20020610.orig/libplugin.c
> +++ jpilot-0.99.2-cvs-20020610/libplugin.c
> @@ -50,6 +50,10 @@
>        return haystack;
>     }
>     if (case_sense) {
> +       if (!haystack)
> +          return NULL;
> +       if (!needle)
> +          return haystack;
>        return strstr(haystack, needle);
>     } else {
>        needle2 = malloc(strlen(needle)+2);
> 
> Bye,
> 
> [1] http://packages.debian.org/unstable/otherosfs/jpilot.html
> 





More information about the Jpilot mailing list