DATA-DOG / go-sqlmock

Sql mock driver for golang to test database interactions
Other
5.95k stars 404 forks source link

SAST-Check- Dereference after null check sqlmock_go18.go file #296

Open raghvendra-dixit opened 1 year ago

raghvendra-dixit commented 1 year ago

Operating system and Go Version

Linux

Issue

As part of SAST tool run Coverity scam, we could see the code in the mentioned file could land up in null check exception error. Attached screenshot for reference.

sqlmock_go18 image

Reproduction steps

Expected Result

we should be handling the error properly here.

Actual Result