lkml.org 
[lkml]   [2006]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] tpm: sysfs function buffer size fix
Date
Hi Kylene,

On Tuesday, 11. April 2006 22:15, Kylene Jo Hall wrote:
> --- linux-2.6.17-rc1-mm2/drivers/char/tpm/tpm.c 2006-04-11 14:56:13.311776750 -0500
> +++ linux-2.6.17-rc1/drivers/char/tpm/tpm.c 2006-04-11 15:03:29.427032250 -0500
> @@ -490,7 +490,7 @@ static ssize_t transmit_cmd(struct tpm_c
>
> void tpm_gen_interrupt(struct tpm_chip *chip)
> {
> - u8 data[30];
> + u8 data[max(ARRAY_SIZE(tpm_cap), 30)];
> ssize_t rc;
>
> memcpy(data, tpm_cap, sizeof(tpm_cap));
> @@ -504,7 +504,7 @@ EXPORT_SYMBOL_GPL(tpm_gen_interrupt);
>
> void tpm_get_timeouts(struct tpm_chip *chip)
> {
> - u8 data[30];
> + u8 data[max(ARRAY_SIZE(TPM_CAP), 30)];
> ssize_t rc;
> u32 timeout;
>

Once in ALL CAPS and once in lower case?
Sure about these?

Regards

Ingo Oeser
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-11 22:49    [from the cache]
©2003-2011 Jasper Spaans