On Thu, Jul 24, 2008 at 10:35:36PM +0200, Martin Toft wrote:
> On Thu, Jul 24, 2008 at 02:20:22PM -0600, Theo de Raadt wrote:
> > +#define strlcpy(dst, src, size) (strncpy((dst), (src), (size) - 1))
> > +#define strlcat(dst, src, size) (strncat((dst), (src), (size) - 1))
> >
> > That is utterly an
> +#define strlcpy(dst, src, size) (strncpy((dst), (src), (size) - 1))
> +#define strlcat(dst, src, size) (strncat((dst), (src), (size) - 1))
strlcpy() and strlcat() return size_t. strncpy() and strncat() return
char *. These #define do not take care of this (among other things).
On Thu, Jul 24, 2008 at 02:20:22PM -0600, Theo de Raadt wrote:
> +#define strlcpy(dst, src, size) (strncpy((dst), (src), (size) - 1))
> +#define strlcat(dst, src, size) (strncat((dst), (src), (size) - 1))
>
> That is utterly and completely wrong.
Yep, I'm a noob when it comes to these kinds of
On Thu, Jul 24, 2008 at 10:01:50PM +0200, Martin Toft wrote:
> +#define strlcpy(dst, src, size) (strncpy((dst), (src), (size) - 1))
> +#define strlcat(dst, src, size) (strncat((dst), (src), (size) - 1))
To be a bit more specific than Theo, don't believe idiots like Ulrich
Drepper.
There's a *reas
> 6. Compile and link:
>
>$ for i in *.c; do gcc -I /usr/include/freetype2 -c $i; done
>$ gcc -lXft -lXrender -lX11 -lXau -lXdmcp -lXext -lfontconfig -lexpat
> -lfreetype -lz -o cwm *.o
>
Most linux distributions carry a "pmake" package which provides the
a bsd.prog.mk and thus support
+#define strlcpy(dst, src, size) (strncpy((dst), (src), (size) - 1))
+#define strlcat(dst, src, size) (strncat((dst), (src), (size) - 1))
That is utterly and completely wrong.
On Wed, Jul 23, 2008 at 10:55:01PM +0200, Martin Toft wrote:
> I'm trying to compile cwm (/usr/xenocara/app/cwm) on Linux, as I would
> like to use this very supreme window manager on all my non-OpenBSD
> systems as well. The version of cwm that I'm working with is from
> yesterday's -current (23rd
I'm trying to compile cwm (/usr/xenocara/app/cwm) on Linux, as I would
like to use this very supreme window manager on all my non-OpenBSD
systems as well. The version of cwm that I'm working with is from
yesterday's -current (23rd of July, 2008). The Linux distribution is
Ubuntu Feisty.
I have ins
8 matches
Mail list logo