You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by gs...@apache.org on 2007/12/05 10:39:21 UTC

svn commit: r601274 - /harmony/enhanced/drlvm/trunk/vm/port/src/misc/linux/sysencoding.c

Author: gshimansky
Date: Wed Dec  5 01:39:14 2007
New Revision: 601274

URL: http://svn.apache.org/viewvc?rev=601274&view=rev
Log:
Make sure that the copy of the string is always null terminated


Modified:
    harmony/enhanced/drlvm/trunk/vm/port/src/misc/linux/sysencoding.c

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/misc/linux/sysencoding.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/misc/linux/sysencoding.c?rev=601274&r1=601273&r2=601274&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/misc/linux/sysencoding.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/misc/linux/sysencoding.c Wed Dec  5 01:39:14 2007
@@ -28,4 +28,5 @@
     char *system_message)
 {
     strncpy(converted_message, system_message, buffer_size - 1);
+    converted_message[buffer_size - 1] = '\0';
 }