yashwantkumargaurav / fb2pdf

Automatically exported from code.google.com/p/fb2pdf
1 stars 0 forks source link

get rid of tmpnam #28

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
/sw/lib/python2.4/site-packages/fb2pdf/fb2tex.py:582: RuntimeWarning:
tempnam is a potential security risk to your program
  fname = os.tempnam(".", "enc") + "." + image_exts[ct]

get rid of it.

Original issue reported on code.google.com by kroko...@gmail.com on 9 Mar 2007 at 7:53

GoogleCodeExporter commented 8 years ago
we may use built-in tempfile() function and pass to Image.open() not a file 
name, 
but file object returned by tempfile()

Original comment by alex.s...@gmail.com on 15 Mar 2007 at 12:24

GoogleCodeExporter commented 8 years ago
we need file, because it is referenced by name in Tex document.

Original comment by kroko...@gmail.com on 15 Mar 2007 at 12:28

GoogleCodeExporter commented 8 years ago
I have a fix: generate image files in the same directory as the output TeX file,
using its name as a prefix.

Original comment by tri...@gmail.com on 17 Mar 2007 at 2:14

GoogleCodeExporter commented 8 years ago
please, commit it.

Original comment by kroko...@gmail.com on 17 Mar 2007 at 2:21

GoogleCodeExporter commented 8 years ago
Using input file name to derive enclosure file names.

Original comment by tri...@gmail.com on 18 Mar 2007 at 12:57