ropensci / readODS

Read ODS (OpenDocument Spreadsheet) into R as data frame. Also support writing data frame into ODS file.
https://docs.ropensci.org/readODS/
Other
55 stars 22 forks source link

`list_fods_sheets` can't guard non-fods XML disguised as `fods` #163

Closed chainsawriot closed 1 year ago

chainsawriot commented 1 year ago
rubbish_file <- tempfile(fileext = ".fods")
writeLines("<ul><li>hello</li></ul>", rubbish_file)
list_fods_sheets(rubbish_file) ##infinite loop

I will run it over GDB to see why is_flat_ods isn't triggered.

chainsawriot commented 1 year ago

https://github.com/ropensci/readODS/blob/f8fc6570957c3587254dff340e760d4b939d9c79/src/is_ods.cpp#L83-L85

GDB points to these lines for the infinite loop.