From 48c16de8bf74df0fa94a30d29e2e7e3446d48433 Mon Sep 17 00:00:00 2001 From: xuri Date: Sun, 15 Aug 2021 00:06:40 +0800 Subject: Improve security and simplify code - Make variable name more semantic - Reduce cyclomatic complexities for the formula calculate function - Support specified unzip size limit on open file options, avoid zip bombs vulnerability attack - Typo fix for documentation and error message --- stream.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stream.go') diff --git a/stream.go b/stream.go index 9939016..125b58c 100644 --- a/stream.go +++ b/stream.go @@ -346,8 +346,8 @@ func (sw *StreamWriter) SetRow(axis string, values []interface{}, opts ...RowOpt // marshalRowAttrs prepare attributes of the row by given options. func marshalRowAttrs(opts ...RowOpts) (attrs string, err error) { var opt *RowOpts - for _, o := range opts { - opt = &o + for i := range opts { + opt = &opts[i] } if opt == nil { return -- cgit v1.2.1