Sat Nov  1 01:28:35 PST 1997 [email protected]

       * gdk/gdk.c (gdk_init): Fix malloc request size for argv_orig.

       * gtk/gtkmain.c (gtk_handle_idle): Fix nasty insidious bug,
       which resulted on occasion in a deleted idle function
       being called.

The first patch is simple and self-explantory.

The second may take a bit more explanation:

[ The patches are on gtk+971025. ]

Without this patch the following sequence of events can happen, with
dire consequences (segfaults...):

  1) gtk_handle_idle starts running the idle_functions list.

  2) One of the idle functions (call it A) queues a second idle
     function (B) for removal (on either remove_idles or remove_idles_by_data)
     (via a call to gtk_idle_remove, or gtk_idle_remove_by_data).

     Note that when this is done, the corresponding object for B is
     deref'ed.  This may have been the last reference to the object,
     and so, subsequently, its memory may get freed and then reallocated.

  3) If the idle function which was queued for removal hadn't been
     run yet --- this happens if B came after A in on the idle_functions
     list --- gtk_handle_idle will eventually call idle function B.
     Idle function B will try to do stuff with B's object, causing
     problems if B's objects memory has already been reused.

Cheers,
Geoffrey T. Dairiki <[email protected]>