~ubuntu-branches/ubuntu/quantal/flac/quantal

« back to all changes in this revision

Viewing changes to src/plugin_xmms/plugin.c

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-12-06 16:57:20 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20071206165720-ldii5tm8dq6zxg0l
Tags: 1.2.1-1ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/control: xmms-dev dropped to allow xmms to move to universe,
    adjust maintainer field.

Show diffs side-by-side

added added

removed removed

Lines of Context:
400
400
                if(title) {
401
401
                        if (!is_http_source(filename)) {
402
402
                                static const char *errtitle = "Invalid FLAC File: ";
403
 
                                *title = g_malloc(strlen(errtitle) + 1 + strlen(filename) + 1 + 1);
404
 
                                sprintf(*title, "%s\"%s\"", errtitle, filename);
 
403
                                if(strlen(errtitle) + 1 + strlen(filename) + 1 + 1 < strlen(filename)) { /* overflow check */
 
404
                                        *title = NULL;
 
405
                                }
 
406
                                else {
 
407
                                        *title = g_malloc(strlen(errtitle) + 1 + strlen(filename) + 1 + 1);
 
408
                                        sprintf(*title, "%s\"%s\"", errtitle, filename);
 
409
                                }
405
410
                        } else {
406
411
                                *title = NULL;
407
412
                        }