p2 / quicklook-csv

A QuickLook plugin for CSV files
Other
289 stars 22 forks source link

Crash when previewing small files #8

Closed p2 closed 11 years ago

p2 commented 11 years ago

Original author: reeves.87 (November 28, 2010 15:17:19)

What steps will reproduce the problem?

  1. Attempt to preview a file < 1024 bytes in size

What is the expected output? What do you see instead? Should generate a preview or fail gracefully. Causes a stack overflow after leaving formatFilesize.

What version of the product are you using? On what operating system? 10.6.5

Please provide any additional information below.

The attached patch bumps the buffer sizes for formatString and result up by one to account for the null byte at the end of every c string.

Original issue: http://code.google.com/p/quicklook-csv/issues/detail?id=8

p2 commented 11 years ago

From smokey.ardisson@gmail.com on December 12, 2011 05:39:59 I experienced this crash, too, on 10.5.8. I applied the patch from reeves...@gmail.com and it seems to have fixed the crash for me :-)

p2 commented 11 years ago

From phase.of.matter on October 24, 2012 00:11:51 Thanks for the diff, and believe it or not, this is fixed in rev 22.