On Sat, 27 Feb 2010, Enlightenment SVN wrote:
> Log:
> Move g_strdup to strndup
i hope that the string you pass to strndup is not NULL, otherwise, seg
fault
>
> Author: rui
> Date: 2010-02-27 11:26:11 -0800 (Sat, 27 Feb 2010)
> New Revision: 46598
>
> Modified:
> trunk/elmdentica/src/elmdentica.c
>
> Modified: trunk/elmdentica/src/elmdentica.c
> ===================================================================
> --- trunk/elmdentica/src/elmdentica.c 2010-02-27 19:06:57 UTC (rev 46597)
> +++ trunk/elmdentica/src/elmdentica.c 2010-02-27 19:26:11 UTC (rev 46598)
> @@ -100,7 +100,7 @@
> char *apiroot = (char*)gconf_value_get_string(value);
>
> g_hash_table_remove(my_domains, key);
> - g_hash_table_insert(my_domains, g_strdup(key), g_strdup(apiroot));
> + g_hash_table_insert(my_domains, strndup(key, 1024), strndup(apiroot,
> 1024));
>
> gconf_entry_free(entry);
> }
> @@ -296,7 +296,7 @@
> }
> static void on_message_anchor_clicked(void *data, Evas_Object *obj, void
> *event_info) {
> Elm_Entry_Anchorblock_Info * info =
> (Elm_Entry_Anchorblock_Info*)event_info;
> - char * url = g_strdup((char*)info->name), *frame_label=NULL, *url2=NULL;
> + char * url = strndup((char*)info->name, 1024), *frame_label=NULL,
> *url2=NULL;
> Evas_Object *box=NULL, *button=NULL, *buttons=NULL, *frame=NULL,
> *entry=NULL, *bubble=(Evas_Object*)data;
>
>
> @@ -553,7 +553,7 @@
>
> ubBubble->box=box;
> ubBubble->account_id = account_id;
> - ubBubble->screen_name = g_strdup(screen_name);
> + ubBubble->screen_name = strndup(screen_name, 1024);
> ubBubble->message = status_message;
>
> //evas_object_event_callback_add(bubble, EVAS_CALLBACK_MOUSE_DOWN,
> on_bubble_mouse_down, bubble);
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> enlightenment-svn mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>
>
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel