bugGnash - The GNU Flash player - Bugs: bug #27333, Usage of g_strcmp0 requires glib...

 
 

bug #27333: Usage of g_strcmp0 requires glib 2.16

Submitted by:  Udo Giacomozzi <udog>
Submitted on:  Thu 27 Aug 2009 12:36:11 PM UTC  
 
Category: buildSeverity: 3 - Normal
Release: trunkStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 10 Sep 2009 12:45:33 PM UTC, comment #4:

Rob fixed this in revision 11502

Udo Giacomozzi <udog>
Project Member
Fri 28 Aug 2009 12:56:10 AM UTC, comment #3:

I would have written: std::equals(c, c+4, "null"); or something along those lines. You are right, though, that std::equals is no safer than strcmp.

g_strcmp0 also does a NULL check, so regardless of which comparison function we use, we should add a NULL check.

Bastiaan Jacques <bjacques>
Project Member
Thu 27 Aug 2009 01:15:27 PM UTC, comment #2:

std::equals(c, c + std::strlen("null"), "null"); ?

Not exactly intuitive. I think std::strcmp seems more sensible. If c isn't null-terminated in that example it is no safer than strcmp, as it will go on comparing anyway.

Benjamin Wolsey <bwy>
Project Member
Thu 27 Aug 2009 01:00:00 PM UTC, comment #1:

I think we should use std::equals here, which is safer than strcmp anyway.

Bastiaan Jacques <bjacques>
Project Member
Thu 27 Aug 2009 12:36:11 PM UTC, original submission:

In various libmedia/ files the function "g_strcmp0()" is being used. This function has been introduced in Glib 2.16 and thus makes Gnash require Glib 2.16.

Note that ./configure does not complain about the GLib version beeing too old.

As a quick hack I added the following define in gnashconfig.h which makes libmedia compile:

#define g_strcmp0 strcmp

Udo Giacomozzi <udog>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bwy (Posted a comment)
  • -unavailable- added by bjacques (Posted a comment)
  • -unavailable- added by udog (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 10 Sep 2009 12:45:33 PM UTCudogOpen/ClosedOpen=>Closed
      StatusNone=>Fixed

    Back to the top


    Powered by Savane 3.1-cleanup1