mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-18 21:28:02 +00:00
Fix mkmylofw write_out_padding routine
SVN-Revision: 6758
This commit is contained in:
parent
d5bb3765ca
commit
56d10f7c3c
@ -1,10 +1,22 @@
|
||||
/*
|
||||
* Copyright (C) 2006,2007 Gabor Juhos
|
||||
* $Id$
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
* Copyright (C) 2006,2007 Gabor Juhos <juhosg@freemail.hu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
@ -463,11 +475,10 @@ int
|
||||
write_out_padding(FILE *outfile, size_t len, uint8_t padc, uint32_t *crc)
|
||||
{
|
||||
uint8_t buff[512];
|
||||
size_t buflen;
|
||||
size_t buflen = sizeof(buff);
|
||||
|
||||
memset(buff, padc, buflen);
|
||||
|
||||
buflen = sizeof(buff);
|
||||
while (len > 0) {
|
||||
if (len < buflen)
|
||||
buflen = len;
|
||||
|
Loading…
Reference in New Issue
Block a user