[stgt] [PATCH] Uses size_t for open_memstream size parameter.

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Mon Jun 17 23:26:10 CEST 2013


On Mon, 17 Jun 2013 17:35:25 -0300
Thadeu Lima de Souza Cascardo <cascardo at linux.vnet.ibm.com> wrote:

> open_memstream expects a size_t pointer instead of an int pointer. In
> 64-bit platforms, size_t is 64-bit. Using the int pointer will make
> other bytes be overriden when the stream is closed and on big-endian
> platforms, the size will be updated to 0, which will make tgtadm create
> invalid requests for tgtd.
> 
> iqn.2010-10.org.example:volume-123
> tgtadm: invalid request
> 
> The size_t pointer cast hid this problem, which would produce a warning
> otherwise.
> 
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo at linux.vnet.ibm.com>
> ---
>  usr/concat_buf.c |    2 +-
>  usr/util.h       |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Looks good. Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list