[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[RFR] man://manpages-de/strcpy.3



Hier haben sich nach dem ersten Durchlauf vier Meldungen geändert.

Martin

#. type: Plain text
msgid ""
"The B<strcpy>()  function copies the string pointed to by I<src>, including "
"the terminating null byte (\\(aq\\e0\\(aq), to the buffer pointed to by "
"I<dest>.  The strings may not overlap, and the destination string I<dest> "
"must be large enough to receive the copy.  I<Beware of buffer overruns!> "
"(See BUGS.)"
msgstr ""
"Die Funktion B<strcpy>() kopiert die Zeichenkette, auf die der Zeiger "
"I<Quelle> zeigt, inklusive des abschlieÃ?enden Null-Bytes (\\(aq\\e0\\(aq) an "
"die Stelle, auf die I<Ziel> zeigt. Die Zeichenketten dürfen sich nicht "
"überlappen und die Zielzeichenkette I<Ziel> muss gro� genug sein, um die "
"Kopie aufzunehmen. B<Vorsicht vor Pufferüberläufen!> (Siehe FEHLER)"

#. type: Plain text
msgid ""
"If the length of I<src> is less than I<n>, B<strncpy>()  writes additional "
"null bytes to I<dest> to ensure that a total of I<n> bytes are written."
msgstr ""
"Ist die Länge von I<Quelle> kleiner als I<n>, schreibt B<strncpy>() "
"zusätzliche Null-Bytes nach I<Ziel>, um sicherzustellen, dass insgesamt I<n> "
"Byte geschrieben werden."

#. type: Plain text
msgid ""
"One valid (and intended) use of B<strncpy>()  is to copy a C string to a "
"fixed-length buffer while ensuring both that the buffer is not overflowed "
"and that unused bytes in the target buffer are zeroed out (perhaps to "
"prevent information leaks if the buffer is to be written to media or "
"transmitted to another process via an interprocess communication technique)."
msgstr ""
"Eine gültige (und beabsichtigte) Anwendung von B<strncpy>() ist es, eine "
"C-Zeichenkette in einen Puffer fester Länge zu kopieren und zugleich "
"zweierlei zu garantieren: der Puffer läuft nicht über und nicht benutzte "
"Bytes im Zielpuffer werden auf Null gesetzt. (Vielleicht um Informationslecks "
"zu verhindern, wenn der Puffer auf Medien geschrieben oder mittels einer "
"IPC-Technik (Interprozesskommunikation) zu einem anderen Prozess übertragen "
"werden soll.)"

#.  https://lwn.net/Articles/506530/
#. type: Plain text
msgid ""
"This function is similar to B<strncpy>(), but it copies at most I<size-1> "
"bytes to I<dest>, always adds a terminating null byte, and does not pad the "
"target with (further) null bytes.  This function fixes some of the problems "
"of B<strcpy>()  and B<strncpy>(), but the caller must still handle the "
"possibility of data loss if I<size> is too small.  The return value of the "
"function is the length of I<src>, which allows truncation to be easily "
"detected: if the return value is greater than or equal to I<size>, "
"truncation occurred.  If loss of data matters, the caller I<must> either "
"check the arguments before the call, or test the function return value.  "
"B<strlcpy>()  is not present in glibc and is not standardized by POSIX, but "
"is available on Linux via the I<libbsd> library."
msgstr ""
"Diese Funktion ähnelt B<strncpy>(), aber sie kopiert höchstens I<groesse-1> "
"Byte zum I<ziel>, fügt immer ein abschlie�endes Null-Byte hinzu und füllt "
"das Ziel nicht mit (weiteren) Null-Bytes auf. Diese Funktion behebt einige "
"der Probleme von B<strcpy>() und B<strncpy>(), aber der Aufrufende muss sich "
"mit der Möglichkeit von Datenverlust befassen, wenn I<groesse> zu klein ist. "
"Der Rückgabewert der Funktion ist die Länge der I<quelle>, mit der die "
"Verkürzung leicht erkannt werden kann: wenn der Rückgabewert grö�er als oder "
"gleich der I<groesse> ist, wurde verkürzt. Wenn Datenverlust nicht auftreten "
"darf, I<muss> der Aufrufende entweder die Argumente vor dem Aufruf oder den "
"Rückgabewert der Funktion prüfen. B<strlcpy>() ist nicht in der Glibc "
"vorhanden und nicht von POSIX standardisiert, sondern ist unter Linux über "
"die Bibliothek I<libbsd> verfügbar."


Reply to: