Musepack Forums  

Go Back   Musepack Forums > Main > Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 29 April 2006, 06:12 pm   #1
Zenitram
Member
 
Join Date: Apr 2006
Posts: 5
Default libmpcdec 1.2.2 crash

with this file :
http://mediaarea.net/crash.mpc
If I use libmpcdec 1.2.2, I have a crash with this code :
Code:
mpc_streaminfo Info;
(...)
if (Info.profile_name)
   std::string S=Info.profile_name;
Note that Info.profile is 494.
I think you do not check the value of profile when you map it with a char* for the profile name.
I don't know why the profile is so high.
__________________
Want to know all about your media files? http://mediainfo.sourceforge.net
Zenitram is offline   Reply With Quote
Old 30 April 2006, 11:56 am   #2
Lefungus
Procrastinator
 
Lefungus's Avatar
 
Join Date: Jul 2004
Posts: 131
Default

Which code are you talking about ? There's no std::string in libmpcdec.
After a quick look at the sources, libmpcdec does check invalid profile id and use "n.a." as profile_name
Lefungus is offline   Reply With Quote
Old 30 April 2006, 10:56 pm   #3
Zenitram
Member
 
Join Date: Apr 2006
Posts: 5
Default

Quote:
Originally Posted by Lefungus
Which code are you talking about ? There's no std::string in libmpcdec.
After a quick look at the sources, libmpcdec does check invalid profile id and use "n.a." as profile_name
std::string is my code, sorry I have not be enough explicit
Code:
    FILE *File=_wfopen(CompleteFileName.c_str(), L"rb");
    if (!File)
        return -1;
    mpc_reader_file Reader;
    mpc_reader_setup_file_reader(&Reader, File);

    mpc_streaminfo Info;
    mpc_streaminfo_init(&Info);
    if (mpc_streaminfo_read(&Info, &Reader.reader)!=ERROR_CODE_OK)
    {
        fclose(File);
        return -1; //Not a Musepack file
    }
    if (Info.profile_name)
       std::string S=Info.profile_name;
And with the the given file, it crashes, maybe not for the reason I suspected.
would you like I give you an example complete source code?
__________________
Want to know all about your media files? http://mediainfo.sourceforge.net
Zenitram is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
libmpcdec 1.2.5 Lefungus Development 0 11 February 2007 07:54 pm
libmpcdec not working when linked with mplayer since 1.2.3 Nicholi Development 4 27 January 2007 12:44 pm
./configure missing in libmpcdec 1.2.4 Zenitram Development 6 10 December 2006 03:53 am
Crash in winamp with the musepack plugin cmamet MPC for Windows 15 05 September 2005 11:46 pm
seeking help with XMMSplugin and libmpcdec th0th MPC for UNIX 5 02 June 2005 07:25 pm


All times are GMT. The time now is 02:38 am.


Powered by vBulletin® Version 3.8.11 Beta 2
Copyright ©2000 - 2017, vBulletin Solutions Inc.