History | View | Annotate | Download (8.9 kB)
check-qdict: Fix possible crash
This warning is reported by cppcheck:
check-qdict.c:270: warning: scanf without field width limits can crash with huge input data
Fix it by limiting the field widths to 127 (both key and value take127 characters + a terminating '\0' byte)....
QDict: Small terminology change
Let's call a 'hash' only what is returned by our hash function,anything else is a 'bucket'.
This helps avoiding confusion with regard to how we traverseour table.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
check-qdict: Introduce test for the new iteration API
Fix qtypes' licenses
- Change from GPL to LGPL- Add license text when missing- Minor cosmetic changes to make all headers look the same
QDict: Fix size update
Key replacement should not update the dictionary's size.
This commit also adds a test for the bug.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix sys-queue.h conflict for good
Problem: Our file sys-queue.h is a copy of the BSD file, but there aresome additions and it's not entirely compatible. Because of that, there havebeen conflicts with system headers on BSD systems. Some hacks have beenintroduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...
Introduce QDict unit-tests
This suite contains tests to assure that QDict API works as expected.
To execute it you should have check installed and build QEMU withcheck support enabled (--enable-check-utests) and then run:
$ ./check-qdict
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>...