forked from forgejo/forgejo
Fix missing error check of bufio.Scanner (#29882)
maybe more (cherry picked from commit 0e183d81fc5283f9d2047472de580e4f04a046c1)
This commit is contained in:
parent
40c9fa43cd
commit
664052fb0b
7 changed files with 30 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue