summaryrefslogtreecommitdiffstats
path: root/rbutil/sansapatcher
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/sansapatcher')
-rw-r--r--rbutil/sansapatcher/sansapatcher.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/rbutil/sansapatcher/sansapatcher.c b/rbutil/sansapatcher/sansapatcher.c
index cc1cc8a0a4..aa13df00e5 100644
--- a/rbutil/sansapatcher/sansapatcher.c
+++ b/rbutil/sansapatcher/sansapatcher.c
@@ -623,6 +623,11 @@ int add_bootloader(struct sansa_t* sansa, char* filename, int type)
,bl_length,n);
return -1;
}
+
+ if (memcmp(sectorbuf+0x200+0x1f8,"RBBL",4)!=0) {
+ fprintf(stderr,"[ERR] Not a Rockbox bootloader, aborting.\n");
+ return -1;
+ }
} else {
memcpy(sectorbuf+0x200,bootimg,LEN_bootimg);
}