Skip to content

panic: runtime error: invalid memory address or nil pointer dereference #49

@yangguang2015

Description

@yangguang2015

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x49ec0b]

goroutine 6 [running]:
io.copyBuffer(0x6a6840, 0xc000400600, 0x0, 0x0, 0xc0000c8000, 0x8000, 0x8000, 0x10, 0x626aa0, 0x626aa0)
c:/go/src/io/io.go:409 +0x10b
io.Copy(...)
c:/go/src/io/io.go:368
os.genericReadFrom(0xc000072050, 0x0, 0x0, 0x0, 0x1000000000000, 0x0)
c:/go/src/os/file.go:159 +0x99
os.(*File).ReadFrom(0xc000072050, 0x0, 0x0, 0x7fdce5bc7898, 0xc000072050, 0x4be401)
c:/go/src/os/file.go:153 +0x217
io.copyBuffer(0x6a63a0, 0xc000072050, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc0000a0080, 0xc0000b3000, 0x1c)
c:/go/src/io/io.go:395 +0x2ff
io.Copy(...)
c:/go/src/io/io.go:368
github.com/goftp/file-driver.(*FileDriver).PutFile(0xc00000c280, 0xc0000167e0, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
C:/Users/yangguang/go/src/github.com/goftp/file-driver/driver.go:208 +0x1f1
github.com/goftp/server.commandStor.Execute(0xc0000691e0, 0xc0000142d5, 0x1b)
C:/Users/yangguang/go/src/github.com/goftp/server/cmd.go:1091 +0x142
github.com/goftp/server.(*Conn).receiveLine(0xc0000691e0, 0xc0000142d0, 0x22)
C:/Users/yangguang/go/src/github.com/goftp/server/conn.go:173 +0x169
github.com/goftp/server.(*Conn).Serve(0xc0000691e0)
C:/Users/yangguang/go/src/github.com/goftp/server/conn.go:124 +0xe5
created by github.com/goftp/server.(*Server).Serve
C:/Users/yangguang/go/src/github.com/goftp/server/server.go:263 +0x210

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions