Skip to content

Commit

Permalink
Inconsistent arg check in writeafid (CID 10439)
Browse files Browse the repository at this point in the history
  • Loading branch information
garlick committed Jun 1, 2011
1 parent 6319499 commit 35116d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libdiod/diod_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ writeafid(Npfid *afid, u64 offset, u32 count, u8 *data)
da_t da;
int ret = -1;

if (!afid || !afid->aux || (!data && count > 0)) {
if (!afid || !afid->aux || !data || count == 0) {
np_uerror (EIO);
err ("writeafid: invalid arguments");
goto done;
Expand Down

0 comments on commit 35116d1

Please sign in to comment.