qulogic/pidgin

Fix sizeof calls.
release-2.x.y
2014-03-01, Mark Doliner
38653c63a0d2
Parents f0861dc04cf3
Children a9504b165b27
Fix sizeof calls.

Sorry, forgot that sizeof(pointer to stack buffer) doesn't do what
I want.
--- a/pidgin/win32/untar.c Sat Mar 01 17:00:29 2014 -0800
+++ b/pidgin/win32/untar.c Sat Mar 01 17:04:55 2014 -0800
@@ -392,22 +392,22 @@
/* combine prefix and filename */
memset(nbuf, 0, sizeof nbuf);
- name = nbuf;
if ((tblk)->prefix[0])
{
- snprintf(name, sizeof(name), "%s/%s",
+ snprintf(nbuf, sizeof(nbuf), "%s/%s",
(tblk)->prefix, (tblk)->filename);
}
else
{
- g_strlcpy(name, (tblk)->filename,
- sizeof (name));
+ g_strlcpy(nbuf, (tblk)->filename,
+ sizeof (nbuf));
}
/* Convert any backslashes to forward slashes, and guard
* against doubled-up slashes. (Some DOS versions of "tar"
* get this wrong.) Also strip off leading slashes.
*/
+ name = nbuf;
if (!ABSPATH && (*name == '/' || *name == '\\'))
didabs = 1;
for (n2 = nbuf; *name; name++)