diff options
-rw-r--r-- | debian/changelog | 8 | ||||
-rw-r--r-- | src/api.c | 5 |
2 files changed, 10 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog index 14d93f6..737d886 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,14 @@ +sear.c (0.0.27-1) stable; urgency=low + + * fix uninitialized free + + -- Anton Luka Šijanec <anton@sijanec.eu> Fri, 05 Jan 2024 22:44:45 +0100 + sear.c (0.0.26-1) stable; urgency=low * support for suggested queries and query redirects - -- Anton Luka Šijanec <anton@sijanec.eu> Fri, 01 Jan 2024 16:42:42 +0100 + -- Anton Luka Šijanec <anton@sijanec.eu> Fri, 05 Jan 2024 16:42:42 +0100 sear.c (0.0.25-1) stable; urgency=low @@ -153,6 +153,8 @@ enum sc_return sc_query_google (const char * s, /* breaking change: changed retu char * descclass = NULL; char * titleclass = NULL; char * imageclass = NULL; + char * resultsforclass = NULL; + char * xpathsugg = NULL; htmlDocPtr xmldoc = NULL; char * txtdoc = NULL; int qwasgiven = 0; @@ -182,7 +184,7 @@ enum sc_return sc_query_google (const char * s, /* breaking change: changed retu rs = SC_CAPTCHA; goto rc; } - char * resultsforclass = sc_find_class(txtdoc, "{color:#1967d2}"); + resultsforclass = sc_find_class(txtdoc, "{color:#1967d2}"); if (opt & SC_OPT_IMAGE) { imageclass = sc_find_class(txtdoc, "{font-family:Roboto,Helvetica,Arial,sans-serif}"); if (!imageclass) { @@ -299,7 +301,6 @@ enum sc_return sc_query_google (const char * s, /* breaking change: changed retu } q->string = realloc(q->string, sl+1); strcpy(q->string, s); - char * xpathsugg = NULL; if (resultsforclass) { xpathsugg = malloc(512+strlen(resultsforclass)); sprintf(xpathsugg, "//a[contains(@class, '%s')]", resultsforclass); |