pengutronix / genimage

tool to generate multiple filesystem and flash images from a tree
GNU General Public License v2.0
308 stars 110 forks source link

Missing rauc keys cause segfault #54

Closed thirtythreeforty closed 5 years ago

thirtythreeforty commented 5 years ago

Using this sample configuration:

image rauc.upd8 {
  rauc {
    files = {
      u-boot.imx,
      rootfs.ubifs,
    }

    key = private.pem
    cert = public.pem
  }
}

(note the missing manifest), genimage dereferences a null pointer on line 42 of image-rauc.c:

https://github.com/pengutronix/genimage/blob/67a24410a76f0b3cd1da0ffa083b5eb174b6efcc/image-rauc.c#L34-L42

...leaving only a very confusing "Segmentation fault" error message in its wake.

michaelolbrich commented 5 years ago

Indeed. We should add a rauc_setup() to check that.