Re: Doubt

From: Christophe Saout
Date: Mon Jun 28 2004 - 15:00:13 EST


Am Mo, den 28.06.2004 um 20:59 Uhr +0200 schrieb Esteve EspuÃa Sargatal:

> #include <asm/string.h> /* for strcpy */
>
> static char remcomOutBuffer[BUFMAX];
>
> strcpy(remcomOutBuffer, "OK");
>
> Hope it's ok.

Not really. Well, this example here works, but only if you know that you
won't overflow the buffer.

strlcpy(emcomOutBuffer, "OK", BUFMAX);

(replace "OK" with the string you wish to copy)

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil