Re: [BUG] Broken code in orb.c
- From: Tomas Ogren <stric ing umu se>
- To: GNOME Discussiion <gnome-list gnome org>
- Subject: Re: [BUG] Broken code in orb.c
- Date: Sat, 23 Jan 1999 03:24:13 +0100
On 23 January, 1999 - Momchil 'Velco' Velikov sent me these 1.0K bytes:
> Well, the code is just wrong ... here's a patch
[...]
> - buf = alloca(strlen(ctmp) + sizeof("/.orbitrc"));
> - sprintf(ctmp, "%s/.orbitrc", buf);
> + buf = alloca(strlen(ctmp) + 9 /* strlen("/.orbitrc") */ + 1 );
> + sprintf(buf, "%s/.orbitrc", ctmp);
Umm.. any reason to use 9 + 1 instead of sizeof("/.orbitrc") ?
Maybe even using g_strdup_printf or something..?
/Tomas
--
Tomas Ögren, stric@ing.umu.se, http://www.ing.umu.se/~stric/
|- Student of Computer Science at the University of Umeå
`- Sysadmin at {ing,acc}.umu.se
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]