Enlightenment CVS committal
Author : moom
Project : e17
Module : libs/etk
Dir : e17/libs/etk/src/lib
Modified Files:
etk_string.c
Log Message:
* [String] Fix potential segv with Etk_String on x86_64
===================================================================
RCS file: /cvs/e/e17/libs/etk/src/lib/etk_string.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- etk_string.c 20 Oct 2006 17:51:44 -0000 1.14
+++ etk_string.c 25 Feb 2007 23:30:18 -0000 1.15
@@ -91,7 +91,14 @@
*/
Etk_String *etk_string_new_vprintf(const char *format, va_list args)
{
- return etk_string_set_vprintf(ETK_STRING(etk_object_new(ETK_STRING_TYPE,
NULL)), format, args);
+ Etk_String *new_string;
+ va_list args2;
+
+ va_copy(args2, args);
+ new_string =
etk_string_set_vprintf(ETK_STRING(etk_object_new(ETK_STRING_TYPE, NULL)),
format, args2);
+ va_end(args2);
+
+ return new_string;
}
/**
@@ -275,7 +282,7 @@
Etk_String *result;
va_copy(args2, args);
- text = _etk_string_vprintf(format, args);
+ text = _etk_string_vprintf(format, args2);
result = etk_string_set(string, text);
free(text);
va_end(args2);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs