mirror of
https://github.com/joel16/PSP-Everest.git
synced 2024-11-26 21:10:39 +00:00
hardware_utils: Limit buffer lengths appropriately
This commit is contained in:
parent
b1a8930aa2
commit
c7c4d39c59
@ -1,7 +1,7 @@
|
||||
#ifndef ___KUMDMAN_H___
|
||||
#define ___KUMDMAN_H___
|
||||
|
||||
extern char outtxt[20];
|
||||
extern char outtxt[0x12];
|
||||
|
||||
typedef struct {
|
||||
unsigned char peripheral_device_type;
|
||||
|
@ -9,12 +9,12 @@
|
||||
#include "translate.h"
|
||||
#include "kumdman.h"
|
||||
|
||||
static char macbuf[256];
|
||||
static char macbuf[18];
|
||||
|
||||
ATAPI_INQURIY ai;
|
||||
u8 buf[0x38];
|
||||
u8 param[4] = { 0, 0, 0x38, 0 };
|
||||
char outtxt[20];
|
||||
char outtxt[0x12];
|
||||
|
||||
int pspGetFirstSymbolOfModel(void) {
|
||||
switch(psp_model + 1) {
|
||||
@ -118,7 +118,7 @@ char *pspGetUMDFWText(void) {
|
||||
pspUmdExecInquiryCmd(pspUmdManGetUmdDrive(0), param, buf);
|
||||
memset(outtxt, 0, sizeof(outtxt));
|
||||
memcpy(&ai, buf, sizeof(ATAPI_INQURIY));
|
||||
strncpy(outtxt, ai.sony_spec, 20);
|
||||
snprintf(outtxt, 5, ai.sony_spec);
|
||||
return outtxt;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user