Messages in this thread | | | Subject | Re: Doubt | From | Christophe Saout <> | Date | Mon, 28 Jun 2004 21:58:58 +0200 |
| |
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)
[unhandled content-type:application/pgp-signature] | |