Open Cvjark opened 3 weeks ago
Thank you for reporting this.
Three of the failure cases you supplied, I could fix with only small changes to the code, so I have done so.
Two of the cases could not be easily fixed, without substantial changes to the XML parsing logic, which would add more than I want to, to the size of the program. I'm sorry, but I will not be fixing these.
The failures in this bug report all relate to the handling of corrupt EPUB files. That is, they contain missing XML files, or XML files that are badly-formed. I do not claim that epub2txt2 is robust against abuse of that kind. Its design priorities are small size, speed, and minimal dependencies. Even when a bug of this type can be fixed, the fix just changes a crash into a fatal error message. Fixing such bugs does not really improve the user experience much, if at all.
I appreciate bug reports, but I do want to remind people that epub2txt2 is not designed to operate in a hostile environment, where it will be supplied with deliberately broken input data. It should not be used in this way, and I can't promise to fix bugs if it is.
Hi, i found some Crash in this repo
versionn:v2.08 github commit code: 67b1308fbd3a93f688ab51324253d4b3b8def52a
command to reproduce the crash:
$epub2txt -a [crash sample file]
ps: unzip to get the sample file.sample file1:
id_000000,sig_11,src_000013,time_2230,execs_103,op_inf,pos_0.zipsample file02:
id_000002,sig_11,src_000013,time_44690,execs_1497,op_quick,pos_784.zipsample file 3:
id_000009,sig_11,sync_s1,src_000010.zipsample file 4:
id_000013,sig_11,src_000200,time_3909190,execs_108727,op_quick,pos1796,val+1.zipsample file 5:
id_000009,sig_06,sync_main,src_000009.zip