mpss-daemon-3.2 bug

mpss-daemon-3.2 bug


Just want to signal this bug we discover yesterday together with Akshay Giridhar Ravichandran (

We are not using the kernel shipped with the MPSS but the one available at Sometimes micctrl -b is wrongly returns "is not a k1om image" error. So we dig into mpss-daemon-3.2 package and we figure out that there is an error in the code. We propose a quick fix to the problem in the following.

The file to be updated is:

The function to be modified is:
int verify_bzImage(struct mpss_env *menv, char *name, char *tag)

Previous code:
if ((found = memchr(buf, 0x1f, num)) != NULL)
                        if (((unsigned char)found[1] == 0x8b) && (found[2] == 0x8))
                                goto write_tmpfile;

New code:
int offset =0;
        if ((found = memchr(buf+offset, 0x1f, num-offset)) != NULL)
                if (((unsigned char)found[1] == 0x8b) && (found[2] == 0x8))
                        goto write_tmpfile;
                        if ((unsigned long) found < (unsigned long)(buf +4096)){
                                offset= (unsigned int) found - (unsigned int) buf +1;
                                goto recheck;



1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.