[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug in openlog()
From: |
Axel Kittenberger |
Subject: |
Re: bug in openlog() |
Date: |
Wed, 9 Jan 2002 14:03:08 +0100 |
On Friday 21 December 2001 23:19, Ulrich Drepper wrote:
> Of course it can hurt. Somebody might depend on this behavior. It's
> just like putenv(), the user can change the string afterwards.
If they depend on this behavior. aren't they doing something wrong?
I might be wrong but it's just like depending like with"c = a() + b();" that
a is called before b. 99% of the times it will be this case but not always,
and if future revisions break your exception it's your fault.
Imagine folliwing use of openlog
void my_open()
{
char myname[100];
snprintf(myname, 100, "%s%d%s", borc, corc, dorc);
openlog(myname, LOG_PID, LOG_DAEMON);
}
Is it commonly known / obvious that this will result in a crash? (myname
gets invalid when leaving the function).
- Axel
- Re: bug in openlog(),
Axel Kittenberger <=