staging: bcm: nvm.c: Cleaning up a array that is filled incompletely
Array 'SigBuff' is filled incompletely. Someone forget to multiply for the sizeof type. This was partly found using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b6d8d3a729
commit
be30e7ac4f
@ -3591,7 +3591,7 @@ int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section
|
||||
|
||||
if (IsThisHeaderSector == TRUE) {
|
||||
/* If this is header sector write 0xFFFFFFFF at the sig time and in last write sig */
|
||||
memcpy(SigBuff, Buff + sigOffset, MAX_RW_SIZE);
|
||||
memcpy(SigBuff, Buff + sigOffset, sizeof(SigBuff));
|
||||
|
||||
for (i = 0; i < MAX_RW_SIZE; i++)
|
||||
*(Buff + sigOffset + i) = 0xFF;
|
||||
@ -3704,7 +3704,7 @@ int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section
|
||||
|
||||
if (IsThisHeaderSector == TRUE) {
|
||||
/* If this is header sector write 0xFFFFFFFF at the sig time and in last write sig */
|
||||
memcpy(SigBuff, Buff + sigOffset, MAX_RW_SIZE);
|
||||
memcpy(SigBuff, Buff + sigOffset, sizeof(SigBuff));
|
||||
|
||||
for (i = 0; i < MAX_RW_SIZE; i++)
|
||||
*(Buff + sigOffset + i) = 0xFF;
|
||||
|
Loading…
x
Reference in New Issue
Block a user