Package: libtagc0
Version: 1.4-8+b1
Severity: important

        Hi !

As it seems, at least the C binding of the library do not return NULL
when opening a file that exists, but ends with the .mp3 extension..

Output with attached example is:
/nonexistent.mp3: safe file !
/nonexistent: Unsafe file !

The example can be compiled with:
  gcc -o test -ltag_c ./test.c


Romain

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.23.1-mactel (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=fr_FR, LC_CTYPE=fr_FR (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages libtagc0 depends on:
ii  libc6                         2.6.1-6    GNU C Library: Shared libraries
ii  libgcc1                       1:4.2.2-3  GCC support library
ii  libstdc++6                    4.2.2-3    The GNU Standard C++ Library v3
ii  libtag1c2a                    1.4-8+b1   TagLib Audio Meta-Data Library

libtagc0 recommends no packages.

-- no debconf information
#include <taglib/tag_c.h>
#include <stdio.h>

 int main(void)
 {
     TagLib_File *f = taglib_file_new("/nonexistent.mp3") ;

     printf("/nonexistent.mp3: ");
     if (f == NULL)
       printf("Unsafe file !\n");
     else
       printf("safe file !\n");

     taglib_file_free(f);
     f = taglib_file_new("/nonexistent") ;

     printf("/nonexistent: ");
     if (f == NULL)
       printf("Unsafe file !\n");
     else
       printf("safe file !\n");

     taglib_file_free(f);


     return 0;
 }

Reply via email to