summaryrefslogtreecommitdiffstats
path: root/modules/markup
diff options
context:
space:
mode:
authorcoldWater <forsaken628@gmail.com>2024-03-19 10:20:36 +0800
committerGitHub <noreply@github.com>2024-03-19 02:20:36 +0000
commit0e183d81fc5283f9d2047472de580e4f04a046c1 (patch)
tree8f08d554fb9ed6c2f48d2e77e61f1ac348b76155 /modules/markup
parent1f0d31ce8fdfc8c32f84e4e0801c2d04b727bbd8 (diff)
downloadgitea-0e183d81fc5283f9d2047472de580e4f04a046c1.tar.gz
gitea-0e183d81fc5283f9d2047472de580e4f04a046c1.zip
Fix missing error check of bufio.Scanner (#29882)
maybe more
Diffstat (limited to 'modules/markup')
-rw-r--r--modules/markup/csv/csv.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/markup/csv/csv.go b/modules/markup/csv/csv.go
index 570c4f4704..50bb918442 100644
--- a/modules/markup/csv/csv.go
+++ b/modules/markup/csv/csv.go
@@ -6,6 +6,7 @@ package markup
import (
"bufio"
"bytes"
+ "fmt"
"html"
"io"
"regexp"
@@ -123,6 +124,10 @@ func (Renderer) fallbackRender(input io.Reader, tmpBlock *bufio.Writer) error {
return err
}
}
+ err = scan.Err()
+ if err != nil {
+ return fmt.Errorf("scan: %w", err)
+ }
_, err = tmpBlock.WriteString("</pre>")
if err != nil {