Update workbook.go
fix bug:use invalid size to alloc memory when read big document
This commit is contained in:
parent
991920a697
commit
898223162e
11
workbook.go
11
workbook.go
@ -204,11 +204,12 @@ func (w *WorkBook) get_string(buf io.ReadSeeker, size uint16) (res string, err e
|
|||||||
}
|
}
|
||||||
err = binary.Read(buf, binary.LittleEndian, bts)
|
err = binary.Read(buf, binary.LittleEndian, bts)
|
||||||
}
|
}
|
||||||
if flag&0x4 != 0 {
|
|
||||||
var bts []byte
|
//if flag&0x4 != 0 {
|
||||||
bts = make([]byte, phonetic_size)
|
// var bts []byte
|
||||||
err = binary.Read(buf, binary.LittleEndian, bts)
|
// bts = make([]byte, phonetic_size)
|
||||||
}
|
// err = binary.Read(buf, binary.LittleEndian, bts)
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user