encode_col(-9) explodes #1244
Labels
No Label
DBF
Dates
Defined Names
Features
Formula
HTML
Images
Infrastructure
Integration
International
ODS
Operations
Performance
PivotTables
Pro
Protection
Read Bug
SSF
SYLK
Style
Write Bug
good first issue
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#1244
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
<--- Last few GCs --->
[23635:0x104801e00] 28594 ms: Scavenge 1397.9 (1424.8) -> 1397.9 (1426.3) MB, 13.0 / 0.0 ms (average mu = 0.200, current mu = 0.058) allocation failure
[23635:0x104801e00] 29869 ms: Mark-sweep 1398.9 (1426.3) -> 1398.9 (1425.8) MB, 1274.1 / 0.0 ms (+ 0.0 ms in 30 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 1291 ms) (average mu = 0.127, current mu = 0.034) alloca
<--- JS stacktrace --->
==== JS stack trace =========================================
encode_col
expects a nonnegative argument; passing a negative argument will result in an infinite loop. Fortunately that's easy to fix: https://github.com/SheetJS/js-xlsx/blob/master/bits/27_csfutils.js#L7 should throw an error on a negative argument.If this is coming from an attempt to read an actual file, that's a sign of a deeper issue and it would be appreciated if you could share the offending file.
I passed it a -9, but it did not throw.
It currently doesn't but should. Here's a quick fix, feel free to submit as a PR: