Opened 11 years ago

Closed 11 years ago

#9871 closed bug (fixed)

[btrfs] Chunk.cpp: Null pointer argument in call to memory copy function

Reported by: mt Owned by: korli
Priority: normal Milestone: R1
Component: File Systems/Btrfs Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

In Chunk::Chunk(), if fChunk is NULL, then memcpy() has Null pointer argument. Please see attached report.

Attachments (3)

0005-Chunk-Chunk-Fix-Null-pointer-argument-in-call-to-mem.patch (2.2 KB ) - added by mt 11 years ago.
Patch
report-mq2NP5.html (14.4 KB ) - added by mt 11 years ago.
Report by Clang Static Analyzer
0005-Chunk-Chunk-Fix-Null-pointer-argument-in-call-to-mem.2.patch (1.0 KB ) - added by mt 11 years ago.
New patch

Download all attachments as: .zip

Change History (7)

comment:1 by mt, 11 years ago

patch: 01

by mt, 11 years ago

Attachment: report-mq2NP5.html added

Report by Clang Static Analyzer

comment:2 by korli, 11 years ago

Thanks for the report and patch! Though it's usually more readable to return early once fInitStatus is set. Could you take this into account in your patch and attach it?

comment:3 by mt, 11 years ago

Hi, I rewrite patch, please review.

comment:4 by korli, 11 years ago

Resolution: fixed
Status: newclosed

Applied in hrev45859, thanks!

Note: See TracTickets for help on using tickets.