Menu

#1 crash fix (encoding related)

open
nobody
None
5
2006-06-10
2006-06-10
No

Hi,

I'm using easyh10 1.4 with cui on Debian Linux.

When easyh10 encounters filenames with encodings
other than the default or specified encoding, easyh10
crashes:

easyh10 -C -n /media/sda1
[...]
Obtaining media information from 2473 files:
113: dj jstina_aguilera_-_genie_in_a_bottle.mp3

#0 ucs2len (string=0x0) at ucs2char.c:71
#1 0x080585d5 in ucs2dup (src=0x0) at ucs2char.c:190
#2 0x08053273 in h10db_set_title (h10db=0x807bf38,
index=112, value=0x0) at h10db.c:856
#3 0x08059dac in gettag_set_info (h10db=0x807bf38,
index=112, info=0xb388fc08) at getmediainfo.c:136
#4 0x0804d460 in easyh10_database
(path_to_root=0xbfd40c54, path_to_db=0xbfd3cc50,
path_to_music=0xbfd3ac4e, model_filename=0xbfd36c4a,
info_extractor=0x0, flags=67174400,
instance=0xbfd45c6c, progress_proc=0x8049ea0
<database_progress>, error_proc=0x804a2b0
<easyh10_error>)
at ../common/easyh10_database.c:737
#5 0x0804b49b in main (argc=4, argv=0xbfd45d24) at
main.c:1108

I'm attaching a patch that gives a warning to stderr
and simply continues with the next file. The warning
should be passed to an error handler, I suppose, but
currently there is none available in that context.

Discussion

  • Carsten Pfeiffer

    a patch fixing a crash when a filename with wrong encoding is found

     
  • Naoaki Okazaki

    Naoaki Okazaki - 2006-06-13

    Logged In: YES
    user_id=992421

    Thank you for sending the patch.

    Actually, the error handling has been the most weak point in
    the current source code. I will think about these in the
    future because there're many places where these conversion
    functions are used.

     

Log in to post a comment.