History log of /freebsd/sys/contrib/libnv/nvlist.c (Results 26 – 42 of 42)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 999c1fd6 30-Jul-2016 Baptiste Daroussin <bapt@FreeBSD.org>

Remove usage of _WITH_DPRINTF


# 1b550329 17-Jul-2016 Mariusz Zaborski <oshogbo@FreeBSD.org>

Fix nvlist array memory leak.

When we change nvl_array_next to NULL it means that we want to destroy or
take nvlist_array. The nvpair, which stores next nvlist of nvlist_array element
is no longer n

Fix nvlist array memory leak.

When we change nvl_array_next to NULL it means that we want to destroy or
take nvlist_array. The nvpair, which stores next nvlist of nvlist_array element
is no longer needed and can be freed.

Submitted by: Adam Starak <starak.adam@gmail.com>
MFC after: 1 week

show more ...


Revision tags: release/10.3.0
# 11d38a57 28-Oct-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Merge from head

Sponsored by: Gandi.net


# f94594b3 12-Sep-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Finish merging from head, messed up in previous attempt


# b5ff185e 12-Sep-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Merge from head


# 00176600 09-Sep-2015 Navdeep Parhar <np@FreeBSD.org>

Merge r286744-r287584 from head.


# 23a32822 25-Aug-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Merge from HEAD


# 6fdf637e 17-Aug-2015 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r286697 through r286857.


# 347a39b4 15-Aug-2015 Mariusz Zaborski <oshogbo@FreeBSD.org>

Add support for the arrays in nvlist library.

- Add
nvlist_{add,get,take,move,exists,free}_{number,bool,string,nvlist,
descriptor} functions.
- Add support for (un)packing arrays.
- Add the nvl_

Add support for the arrays in nvlist library.

- Add
nvlist_{add,get,take,move,exists,free}_{number,bool,string,nvlist,
descriptor} functions.
- Add support for (un)packing arrays.
- Add the nvl_array_next field to the nvlist structure.
If an array is added by the nvlist_{move,add}_nvlist_array function
this field will contains next element in the array.
- Add the nitems field to the nvpair and nvpair_header structure.
This field contains number of elements in the array.
- Add special flag (NV_FLAG_IN_ARRAY) which is set if nvlist is a part of
an array.
- Add special type (NV_TYPE_NVLIST_ARRAY_NEXT).This type is used only
on packing/unpacking.
- Add new API for traversing arrays (nvlist_get_array_next).
- Add the nvlist_get_pararr function which combines the
nvlist_get_array_next and nvlist_get_parent functions. If nvlist is in
the array it will return next element from array. If nvlist is last
element in array or it isn't in array it will return his
container (parent). This function should simplify traveling over nvlist.
- Add tests for new features.
- Add documentation for new functions.
- Add my copyright.
- Regenerate the sys/cddl/compat/opensolaris/sys/nvpair.h file.

PR: 191083
Reviewed by: allanjude (doc)
Approved by: pjd (mentor)

show more ...


# ab875b71 14-Aug-2015 Navdeep Parhar <np@FreeBSD.org>

Catch up with head, primarily for the 1.14.4.0 firmware.


# f98ee844 12-Aug-2015 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r286422 through r286684.


Revision tags: release/10.2.0
# c68f8061 11-Aug-2015 Mariusz Zaborski <oshogbo@FreeBSD.org>

If any function fail (the ptr variable will be equal to NULL), we shouldn't
return buffer. Instead we should free it and return NULL.

Approved by: pjd (mentor)


# 30740f45 11-Aug-2015 Mariusz Zaborski <oshogbo@FreeBSD.org>

The nvlist_move_nvpair() function can fail in two cases, if:
- the nvlist error is set, or
- the nvlist case ignore flag is not set and there is attend to
add element with duplicated name.
In both

The nvlist_move_nvpair() function can fail in two cases, if:
- the nvlist error is set, or
- the nvlist case ignore flag is not set and there is attend to
add element with duplicated name.
In both cases the nvlist_move_nvpair() function free nvpair structure.
If library will try to unpack a binary blob which contains duplicated
names it will end up with using memory after free.

To prevent that, the nvlist_move_nvpair() function interface is changed
to report about failure and checks are added to the nvpair_xunpack()
function.

Discovered thanks to the american fuzzy lop.

Approved by: pjd (mentor)

show more ...


# 51dae13f 11-Aug-2015 Mariusz Zaborski <oshogbo@FreeBSD.org>

Don't set parent if the unpack operation fail. In some
case this could crash the library, because of the NULL pointer references.

Discovered thanks to american fuzzy lop.

Approved by: pjd (mentor)


# 89ca10c6 11-Aug-2015 Mariusz Zaborski <oshogbo@FreeBSD.org>

Make the nvlist_next(9) function handle NULL pointer variable.
This simplifies removing the first element from nvlist.

Reviewed by: AllanJude
Approved by: pjd (mentor)


# 4cd9b24e 04-Jul-2015 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r284737 through r285152.


# 54f98da9 04-Jul-2015 Mariusz Zaborski <oshogbo@FreeBSD.org>

Move the nvlist source and private includes from sys/kern to seperate
directory sys/contrib/libnv.

The goal of this operation is to NOT install header files which shouldn't
be used outside the nvlis

Move the nvlist source and private includes from sys/kern to seperate
directory sys/contrib/libnv.

The goal of this operation is to NOT install header files which shouldn't
be used outside the nvlist library.

Approved by: pjd (mentor)

show more ...


12