mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
libsndfile: update to 1.0.19 (LBSNDF-7)
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0186 http://www.mega-nerd.com/libsndfile/libsndfile-1.0.19.tar.gz This will likely require a fresh boostrap to updated source checkouts. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13415 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
** Copyright (C) 2005 Erik de Castro Lopo
|
||||
** Copyright (C) 2005-2009 Erik de Castro Lopo
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
@@ -185,8 +185,8 @@ db_add_file (REG_DB * db_handle, const char * filepath)
|
||||
|
||||
snprintf (db->cmdbuf, sizeof (db->cmdbuf), "insert into sndfile "
|
||||
"(fname, fpath, srate, frames, channels, format, checksum, logbuf) values"
|
||||
"('%s','%s',%d,'%lld', %d, '0x%08x', '0x%08x', '%s');",
|
||||
db->filename, db->pathname, info.samplerate, info.frames, info.channels, info.format, checksum, db->logbuf) ;
|
||||
"('%s','%s',%d,'%ld', %d, '0x%08x', '0x%08x', '%s');",
|
||||
db->filename, db->pathname, info.samplerate, (long) info.frames, info.channels, info.format, checksum, db->logbuf) ;
|
||||
|
||||
if (strlen (db->cmdbuf) >= sizeof (db->cmdbuf) - 1)
|
||||
{ printf ("strlen (db->cmdbuf) too long.\n") ;
|
||||
@@ -311,8 +311,8 @@ get_filename_pathname_by_ekey (REGTEST_DB * db, int ekey)
|
||||
exit (1) ;
|
||||
} ;
|
||||
|
||||
strncpy (db->filename, result [2], sizeof (db->filename)) ;
|
||||
strncpy (db->pathname, result [3], sizeof (db->pathname)) ;
|
||||
snprintf (db->filename, sizeof (db->filename), "%s", result [2]) ;
|
||||
snprintf (db->pathname, sizeof (db->pathname), "%s", result [3]) ;
|
||||
|
||||
sqlite3_free_table (result) ;
|
||||
|
||||
@@ -368,7 +368,7 @@ check_file_by_ekey (REGTEST_DB * db, int ekey)
|
||||
if (strcmp (result [k], "frames") == 0)
|
||||
{ if (strtoll (result [k + cols], NULL, 10) == info.frames)
|
||||
continue ;
|
||||
printf ("\n\nError : frames doesn't match : %s == %lld\n", result [k + cols], info.frames) ;
|
||||
printf ("\n\nError : frames doesn't match : %s == %ld\n", result [k + cols], (long) info.frames) ;
|
||||
} ;
|
||||
|
||||
if (strcmp (result [k], "channels") == 0)
|
||||
@@ -411,6 +411,7 @@ check_file_by_ekey (REGTEST_DB * db, int ekey)
|
||||
static void
|
||||
get_filename_pathname (REGTEST_DB * db, const char *filepath)
|
||||
{ const char * cptr ;
|
||||
int slen ;
|
||||
|
||||
if (filepath [0] != '/')
|
||||
{ memset (db->pathname, 0, sizeof (db->pathname)) ;
|
||||
@@ -419,18 +420,19 @@ get_filename_pathname (REGTEST_DB * db, const char *filepath)
|
||||
exit (1) ;
|
||||
} ;
|
||||
|
||||
db->pathname [strlen (db->pathname)] = '/' ;
|
||||
strncat (db->pathname, filepath, sizeof (db->pathname)) ;
|
||||
slen = strlen (db->pathname) ;
|
||||
db->pathname [slen ++] = '/' ;
|
||||
snprintf (db->pathname + slen, sizeof (db->pathname) - slen, "%s", filepath) ;
|
||||
}
|
||||
else
|
||||
strncpy (db->pathname, filepath, sizeof (db->pathname)) ;
|
||||
snprintf (db->pathname, sizeof (db->pathname), "%s", filepath) ;
|
||||
|
||||
if ((cptr = strrchr (db->pathname, '/')) == NULL)
|
||||
{ printf ("\nError : bad pathname %s\n", filepath) ;
|
||||
exit (1) ;
|
||||
} ;
|
||||
|
||||
strncpy (db->filename, cptr + 1, sizeof (db->filename)) ;
|
||||
snprintf (db->filename, sizeof (db->filename), "%s", cptr + 1) ;
|
||||
} /* get filename_pathname */
|
||||
|
||||
static void
|
||||
@@ -443,9 +445,9 @@ static int
|
||||
count_callback (REGTEST_DB * db, int argc, char **argv, char **colname)
|
||||
{ db->count ++ ;
|
||||
|
||||
argc = 0 ;
|
||||
argv = NULL ;
|
||||
colname = NULL ;
|
||||
(void) argc ;
|
||||
(void) argv ;
|
||||
(void) colname ;
|
||||
return 0 ;
|
||||
} /* count_callback */
|
||||
|
||||
@@ -453,8 +455,8 @@ static int
|
||||
ekey_max_callback (REGTEST_DB * db, int argc, char **argv, char **unused)
|
||||
{ int ekey ;
|
||||
|
||||
argc = 0 ;
|
||||
unused = NULL ;
|
||||
(void) argc ;
|
||||
(void) unused ;
|
||||
|
||||
ekey = strtol (argv [0], NULL, 10) ;
|
||||
if (ekey > db->ekey_max)
|
||||
@@ -467,7 +469,7 @@ static int
|
||||
callback (void *unused, int argc, char **argv, char **colname)
|
||||
{ int k ;
|
||||
|
||||
unused = NULL ;
|
||||
(void) unused ;
|
||||
|
||||
for (k = 0 ; k < argc ; k++)
|
||||
printf ("%s = %s\n", colname [k], argv [k] ? argv [k] : "NULL") ;
|
||||
@@ -491,12 +493,3 @@ dummy (void)
|
||||
} /* dummy */
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
** Do not edit or modify anything in this comment block.
|
||||
** The following line is a file identity tag for the GNU Arch
|
||||
** revision control system.
|
||||
**
|
||||
** arch-tag: c6bcb7cb-0d9e-47b6-a89a-66304df4d462
|
||||
*/
|
||||
|
Reference in New Issue
Block a user