| To: | darrick.wong@xxxxxxxxxx |
|---|---|
| Subject: | re: xfs: use named array initializers for log item dumping |
| From: | Dan Carpenter <dan.carpenter@xxxxxxxxxx> |
| Date: | Wed, 6 Apr 2016 13:56:57 +0300 |
| Cc: | xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| User-agent: | Mutt/1.5.24 (2015-08-30) |
Hello Darrick J. Wong,
The patch 5110cd82ca90: "xfs: use named array initializers for log
item dumping" from Mar 7, 2016, leads to the following static checker
warning:
fs/xfs/xfs_log.c:2085 xlog_print_tic_res()
error: buffer overflow 'trans_type_str' 43 <= 43
fs/xfs/xfs_log.c
2080
2081 xfs_warn(mp, "xlog_write: reservation summary:");
2082 xfs_warn(mp, " trans type = %s (%u)",
2083 ((ticket->t_trans_type <= 0 ||
2084 ticket->t_trans_type > XFS_TRANS_TYPE_MAX) ?
^
Should be >=. Why is zero invalid?
2085 "bad-trans-type" :
trans_type_str[ticket->t_trans_type]),
2086 ticket->t_trans_type);
2087 xfs_warn(mp, " unit res = %d bytes",
regards,
dan carpenter
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | 2016 HOT VR BOX Glasses, 2016 HOT VR BOX Glasses |
|---|---|
| Next by Date: | Re: [PATCH 1/5] xfs: fix inode validity check in xfs_iflush_cluster, Brian Foster |
| Previous by Thread: | 2016 HOT VR BOX Glasses, 2016 HOT VR BOX Glasses |
| Next by Thread: | Re: xfs: use named array initializers for log item dumping, Darrick J. Wong |
| Indexes: | [Date] [Thread] [Top] [All Lists] |