[Clipart] [Bug 5619] Some SVG submissions are corrupted (0 bytes)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jan 24 04:03:31 PST 2006


Please do not reply to this email: if you want to comment on the bug, go to    
       
the URL shown below and enter yourcomments there.     
   
https://bugs.freedesktop.org/show_bug.cgi?id=5619          
     




------- Additional Comments From khiraly123 at gmx.net  2006-01-24 22:59 -------
Ok. Further testing, I suppose, that I have found the problem and the resolution
too.

So the bug appear only, if there is a filetoken parameter. So if there was a
problem, and the upload wasnt successfull, the script store temporary the file,
and demand additional info. But its buggish, and not work (after my opinion).

As I see in the source, the programmer have forgotten open the file, and suppose
there is a filedescriptor (TEMP) around already open. But its not true. So when
the programmer read the whole file, it read nothing, so the result file will be
obviously 0 byte length.

My proposed patch:
at line 66 in the upload_svg.cgi, write this:
open(TEMP, "<",$file);

(is it in the getfromtemporarystorage function)

If you are certain, that the file is already open, write this:
close(TEMP); open(TEMP,"<",$file);

I think that's it. I cant try it right now, because I dont have apache (and
openclipart) installed on my notebook.

Hope this helps something.

Khiraly
          
     
     
--           
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email         
     
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the clipart mailing list