Permalink
Browse files

undisclosed security vulnerability fixed

  • Loading branch information...
1 parent 0d53596 commit 55f8b0d461d78ed86db0c87adb333fcb9b1eb223 @geohot geohot committed Jan 11, 2011
Showing with 2 additions and 3 deletions.
  1. +2 −3 make_self.c
View
@@ -53,8 +53,7 @@ u8 nubpadding_static[] = {
u8 cflags_static[] = {
0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- //0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,
#ifndef NPDRM
0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x62,0x7C,0xB1,0x80,0x8A,0xB9,0x38,0xE3,0x2C,0x8C,0x09,0x17,0x08,0x72,0x6A,0x57,
@@ -308,7 +307,7 @@ void init_Self_NPDRM(Self_NPDRM* npdrm, char* titleid, char* filename) {
for(i=0;i<0x10;i++) npdrm_omac_key[i] = npdrm_omac_key1[i] ^ npdrm_omac_key2[i];
int buf_len = 0x30+strlen(true_filename);
- char *buf = (char*)malloc(buf_len);
+ char *buf = (char*)malloc(buf_len+1);
memcpy(buf, npdrm->titleid, 0x30);
strcpy(buf+0x30, true_filename);
aesOmac1Mode(npdrm->hash1, buf, buf_len, npdrm_omac_key3, sizeof(npdrm_omac_key3)*8);

0 comments on commit 55f8b0d

Please sign in to comment.