]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/io/lzopio.c: Improve crypt context alignment.
authorSzymon Janc <szymon@janc.net.pl>
Mon, 3 Oct 2011 20:06:10 +0000 (22:06 +0200)
committerSzymon Janc <szymon@janc.net.pl>
Mon, 3 Oct 2011 20:06:10 +0000 (22:06 +0200)
grub-core/io/lzopio.c

index e303b29a382d41b13f614027d1fdc46aa389e520..d804c31b0edf3354409997c180e179566d2b69bd 100644 (file)
@@ -166,7 +166,7 @@ read_block_data (struct grub_lzopio *lzopio)
 
   if (lzopio->ccheck_fun)
     {
-      grub_uint8_t context[lzopio->ccheck_fun->contextsize];
+      grub_uint64_t context[(lzopio->ccheck_fun->contextsize + 7) / 8];
 
       lzopio->ccheck_fun->init (context);
       lzopio->ccheck_fun->write (context, lzopio->block.cdata,
@@ -212,7 +212,7 @@ uncompress_block (struct grub_lzopio *lzopio)
 
       if (lzopio->ucheck_fun)
        {
-         grub_uint8_t context[lzopio->ucheck_fun->contextsize];
+         grub_uint64_t context[(lzopio->ccheck_fun->contextsize + 7) / 8];
 
          lzopio->ucheck_fun->init (context);
          lzopio->ucheck_fun->write (context, lzopio->block.udata,