<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git/ubi-utils/ubinize.c, branch v2.3.1</title>
<subtitle>A mirror of http://git.infradead.org/mtd-utils.git</subtitle>
<id>https://git.infraroot.at/mtd-utils.git/atom?h=v2.3.1</id>
<link rel='self' href='https://git.infraroot.at/mtd-utils.git/atom?h=v2.3.1'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/'/>
<updated>2024-12-28T10:37:45+00:00</updated>
<entry>
<title>ubi-utils: FIX DIVISION BY ZERO in ubinize.c</title>
<updated>2024-12-28T10:37:45+00:00</updated>
<author>
<name>Anton Moryakov</name>
<email>ant.v.moryakov@gmail.com</email>
</author>
<published>2024-12-24T19:40:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=43b7c13c294d3aff771419ab9a924ee9a08725a8'/>
<id>urn:sha1:43b7c13c294d3aff771419ab9a924ee9a08725a8</id>
<content type='text'>
Report of the static analyzer:
Variable vi-&gt;alignment, whose possible value set allows a zero value at ubinize.c:375, is used as a denominator at ubinize.c:410.

If you look at the code more closely, it will be clear that the vi-&gt;alignment parameter is obtained from an external file passed as a command line argument.

A check was also performed if you pass a test.ini file of the following type to the input:

[jffs2-volume]
mode=ubi
image=../jffs2.img
vol_id=1
vol_size=30MiB
vol_type=dynamic
vol_name=jffs2_volume
vol_flags=autoresize
vol_alignment=0

and execute the command:

./ubinize -o ubi.img -p 16KiB -m 512 -s 256 test.ini

we will get the result:

Floating point exception (core dumped)

Corrections explained:
Updated the validation logic for vi-&gt;alignment:
- Replaced the check for negative alignment (`vi-&gt;id &lt; 0`) with a more comprehensive check for non-positive alignment (`vi-&gt;alignment &lt;= 0`).
- Updated the corresponding error message to reflect the requirement for a positive volume alignment.
This ensures more robust validation and improves error clarity when invalid alignment values are encountered.

Triggers found by static analyzer Svace.

Signed-off-by: Anton Moryakov &lt;ant.v.moryakov@gmail.com&gt;
Reviewed-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix typos found by Debian's lintian tool</title>
<updated>2020-09-11T13:40:54+00:00</updated>
<author>
<name>Bastian Germann</name>
<email>bastiangermann@fishpost.de</email>
</author>
<published>2020-09-08T20:07:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=763a4b3a17e3fb4ab67c6105e06df891e60471bc'/>
<id>urn:sha1:763a4b3a17e3fb4ab67c6105e06df891e60471bc</id>
<content type='text'>
Signed-off-by: Bastian Germann &lt;bastiangermann@fishpost.de&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubinize: Exit with non-zero exit code on error.</title>
<updated>2019-07-02T12:33:07+00:00</updated>
<author>
<name>Patrick Doyle</name>
<email>wpdster@gmail.com</email>
</author>
<published>2019-07-01T18:25:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=ce51dfe8c4e8ca25f23f3b48c8662bfd1fda1f37'/>
<id>urn:sha1:ce51dfe8c4e8ca25f23f3b48c8662bfd1fda1f37</id>
<content type='text'>
...specifically -1 in all of the new cases.

Signed-off-by: Patrick Doyle &lt;pdoyle@irobot.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubi-utils: ubinize: add support for skipping CRC check of a static volume when opening</title>
<updated>2018-06-28T08:23:23+00:00</updated>
<author>
<name>Quentin Schulz</name>
<email>quentin.schulz@bootlin.com</email>
</author>
<published>2018-06-28T07:43:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=9095d213f536aec0f3c37f6666177f3b907afde7'/>
<id>urn:sha1:9095d213f536aec0f3c37f6666177f3b907afde7</id>
<content type='text'>
Let's let the user configure static UBI volume with CRC checking at
opening disabled if desired.

Introduce the skip-check setting for vol_flags configuration of a
volume.

There is no point in having both autoresize and skip-check set as
skip-check is reserved for static volumes only and it's useless to have
a static volume's size set to autoresize.

Suggested-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Signed-off-by: Quentin Schulz &lt;quentin.schulz@bootlin.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Merge rest of ubiutils-common into libmtd common</title>
<updated>2016-11-17T10:36:56+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2016-09-01T13:27:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=f4ec4511d0729802e783b1757d6bcd556737510e'/>
<id>urn:sha1:f4ec4511d0729802e783b1757d6bcd556737510e</id>
<content type='text'>
This patch moves the remaining 3 functions from ubiutils-common.{c,h}
into libmtd common.{c,h}.

The functions are only generic utility functions that other mtd-utils
programs may also find usefull and every program that uses libubi links
against libmtd anyway so there is no real reason for keeping around a
seperate ubiutils-common with only generic helper functions.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Add ubinize manpage</title>
<updated>2016-11-17T10:36:56+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2016-09-01T13:03:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=942dec0faab61b3d9c814ed013c578edde94d0bb'/>
<id>urn:sha1:942dec0faab61b3d9c814ed013c578edde94d0bb</id>
<content type='text'>
This patch removes the lengthy help text from the ubinize utility
that attempted to describte the file format and every minor detail,
and reformats it into a more readable man page.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>mtd-utils: ubinize: Always return error code (at least -1) in case of an error</title>
<updated>2015-09-29T18:46:41+00:00</updated>
<author>
<name>Enrico Jorns</name>
<email>ejo@pengutronix.de</email>
</author>
<published>2015-09-11T13:28:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=5f50207231414bfdbac8f0f974a2824f24177d6e'/>
<id>urn:sha1:5f50207231414bfdbac8f0f974a2824f24177d6e</id>
<content type='text'>
ubinize should not fail silenty, this can be very annoying when using
it from other tools that rely on the exit code for determining the
success of their operation.

Signed-off-by: Enrico Jorns &lt;ejo@pengutronix.de&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
</entry>
<entry>
<title>ubinize: fix usage text</title>
<updated>2013-07-01T05:37:54+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2013-05-06T22:54:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=f1825095f5fe9173828262d64ba8c1588778ffc6'/>
<id>urn:sha1:f1825095f5fe9173828262d64ba8c1588778ffc6</id>
<content type='text'>
Drop duplicate "and the", and tweak grammar slightly.

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>mkfs.ubifs/ubinize: increase PEB size limit to 2MiB</title>
<updated>2011-08-20T04:07:37+00:00</updated>
<author>
<name>Viktar Palstsiuk</name>
<email>viktar.palstsiuk@promwad.com</email>
</author>
<published>2011-08-20T04:07:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=92ed6c0bf6f6793395cdeec5a61ac2059b005056'/>
<id>urn:sha1:92ed6c0bf6f6793395cdeec5a61ac2059b005056</id>
<content type='text'>
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@intel.com&gt;
</content>
</entry>
<entry>
<title>mtd-utils: switch more utils to unified versioning</title>
<updated>2011-06-29T05:42:40+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2011-06-27T18:27:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=4d1793e25fd6691f8a2407d6d2dfb23809086ef0'/>
<id>urn:sha1:4d1793e25fd6691f8a2407d6d2dfb23809086ef0</id>
<content type='text'>
More utilities now use the common VERSION system.

For utils that printed a very simple message, we use the new
common_print_version() "function."

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Artem Bityutskiy &lt;dedekind1@gmail.com&gt;
</content>
</entry>
</feed>
