Re: [PATCH] Uses size_t for open_memstream size parameter.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 17 Jun 2013 17:35:25 -0300
Thadeu Lima de Souza Cascardo <cascardo@xxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux