In message <[EMAIL PROTECTED]> Mike Smith writes: : Ugh. Take the first example in the paper; it rewrites as : : len = asprintf(&path, "%s/.foorc"); : : as opposed to : : strlcat(path, homedir, sizeof(path)); : strlcat(path, "/", sizeof(path)); : strlcat(path, ".foord", sizeof(path)); : len = strlen(path); : : Yes, they're a better str*cat/cpy, but they're not the solution that : they claim to be. You've forgotten the free(path) sometime later in your code... That's a can of warms you conveniently ignore... And can be big problems for library routines whose API is defined to return stuff into a static buffer... Warner To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
- Re: OpenBSD's strlcpy(3) and strlcat(3) Paul Hart
- Re: OpenBSD's strlcpy(3) and strlc... Mike Smith
- Re: OpenBSD's strlcpy(3) and strlc... Julian Elischer
- Re: OpenBSD's strlcpy(3) and strlc... Mike Smith
- Re: OpenBSD's strlcpy(3) and strlc... Warner Losh
- Re: OpenBSD's strlcpy(3) and strlc... Mike Smith
- Re: OpenBSD's strlcpy(3) and strlc... Warner Losh
- Re: OpenBSD's strlcpy(3) and strlc... Mike Smith
- Re: OpenBSD's strlcpy(3) and strlc... Warner Losh
- Re: OpenBSD's strlcpy(3) and strlc... Valentin Nechayev
- Re: OpenBSD's strlcpy(3) and strlcat(3) Warner Losh
- Re: OpenBSD's strlcpy(3) and strlcat(3) Mike Smith
- Re: OpenBSD's strlcpy(3) and strlcat(3) Tim Vanderhoek
- Re: OpenBSD's strlcpy(3) and strlcat(3) Warner Losh
- Re: OpenBSD's strlcpy(3) and strlcat(3) Sheldon Hearn
- Re: OpenBSD's strlcpy(3) and strlcat(3) Tim Vanderhoek
- Re: OpenBSD's strlcpy(3) and strlcat(3) Warner Losh
- Re: OpenBSD's strlcpy(3) and strlcat(3) Sheldon Hearn
- Re: OpenBSD's strlcpy(3) and strlcat(3) Warner Losh
- Re: OpenBSD's strlcpy(3) and strlcat(3) Sheldon Hearn
- Re: OpenBSD's strlcpy(3) and strlcat(3) Tim Vanderhoek