All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: darrick.wong@oracle.com
Cc: xfs@oss.sgi.com
Subject: re: xfs: use named array initializers for log item dumping
Date: Wed, 6 Apr 2016 13:56:57 +0300	[thread overview]
Message-ID: <20160406105657.GA30644@mwanda> (raw)

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

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

             reply	other threads:[~2016-04-06 10:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-06 10:56 Dan Carpenter [this message]
2016-04-06 16:44 ` xfs: use named array initializers for log item dumping Darrick J. Wong
2016-04-06 20:20 ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160406105657.GA30644@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=darrick.wong@oracle.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.