diff options
Diffstat (limited to 'drivers/misc/altera-stapl')
| -rw-r--r-- | drivers/misc/altera-stapl/altera.c | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/drivers/misc/altera-stapl/altera.c b/drivers/misc/altera-stapl/altera.c index 25e5f24b3fec..5bdf57472314 100644 --- a/drivers/misc/altera-stapl/altera.c +++ b/drivers/misc/altera-stapl/altera.c @@ -2112,8 +2112,8 @@ exit_done:  	return status;  } -static int altera_get_note(u8 *p, s32 program_size, -			s32 *offset, char *key, char *value, int length) +static int altera_get_note(u8 *p, s32 program_size, s32 *offset, +			   char *key, char *value, int keylen, int vallen)  /*   * Gets key and value of NOTE fields in the JBC file.   * Can be called in two modes:  if offset pointer is NULL, @@ -2170,7 +2170,7 @@ static int altera_get_note(u8 *p, s32 program_size,  						&p[note_table + (8 * i) + 4])];  				if (value != NULL) -					strlcpy(value, value_ptr, length); +					strlcpy(value, value_ptr, vallen);  			}  		} @@ -2189,13 +2189,13 @@ static int altera_get_note(u8 *p, s32 program_size,  				strlcpy(key, &p[note_strings +  						get_unaligned_be32(  						&p[note_table + (8 * i)])], -					length); +					keylen);  			if (value != NULL)  				strlcpy(value, &p[note_strings +  						get_unaligned_be32(  						&p[note_table + (8 * i) + 4])], -					length); +					vallen);  			*offset = i + 1;  		} @@ -2449,7 +2449,7 @@ int altera_init(struct altera_config *config, const struct firmware *fw)  			__func__, (format_version == 2) ? "Jam STAPL" :  						"pre-standardized Jam 1.1");  		while (altera_get_note((u8 *)fw->data, fw->size, -					&offset, key, value, 256) == 0) +					&offset, key, value, 32, 256) == 0)  			printk(KERN_INFO "%s: NOTE \"%s\" = \"%s\"\n",  					__func__, key, value);  	} |