diff options
| author | Dave Chapman <dave@dchapman.com> | 2007-03-15 23:55:26 +0000 |
|---|---|---|
| committer | Dave Chapman <dave@dchapman.com> | 2007-03-15 23:55:26 +0000 |
| commit | 1860e9ad475fe4067ff90af995b7bbd9c9783171 (patch) | |
| tree | cf330a306853184e7fc799c101a6c448125b29d4 | |
| parent | 7b8bf1b0e764df17c62f90bd34b06b5121a26cf2 (diff) | |
| download | rockbox-1860e9ad475fe4067ff90af995b7bbd9c9783171.zip rockbox-1860e9ad475fe4067ff90af995b7bbd9c9783171.tar.gz rockbox-1860e9ad475fe4067ff90af995b7bbd9c9783171.tar.bz2 rockbox-1860e9ad475fe4067ff90af995b7bbd9c9783171.tar.xz | |
Add a further safety check - don't allow users to install old bootloaders with sansapatcher
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12796 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | rbutil/sansapatcher/sansapatcher.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rbutil/sansapatcher/sansapatcher.c b/rbutil/sansapatcher/sansapatcher.c index cc1cc8a..aa13df0 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); } |