Commit Graph

14 Commits

Author SHA1 Message Date
Stefan Schmidt c56bb560d0 eldbus: check return of dbus_signature_iter_next()
CID: 1341856
2017-04-26 14:49:37 +02:00
Ji-Youn Park 13bd4242ec eldbus: fix null value usage 2016-09-20 18:10:32 +08:30
WooHyun Jung fa3af69e0c eldbus: null checking before using the pointer 2016-09-20 11:18:52 +09:00
Carsten Haitzler 7d0c5a9423 eldbus - only do syntax checks if libdbus is new enough 2015-10-06 11:29:16 +09:00
Carsten Haitzler 9a467c0451 eldbus - make method calls less crasy since libdbus likes to abort
changes zmike made to e's systray make e abort due to libdbus seeing
the bus name as invalid. it actually is. it's
/org/ayatana/NotificationItem/steam for example - instead of
or.whatever.blah - thuis e aborts continually if you run steam at all.
eldbus should be more crash-proof thus this adds checks so dbus fun
doesnt cause an app to crash if it happens to call incorrect dbus names.

@fix
2015-10-04 17:53:46 +09:00
Marcel Hollerbach 47541b81c6 eldbus: fix _eldbus_message_iter_arguments_vget
Summary:
there is a problem with _eldbus_message_iter_arguments_vget.

Assume: We have a array of type y, there are 3 elements in the array.

Lets say we are iterating with

printf("%c", dbus_message_iter_get_arg_type(iter));

and

dbus_message_iter_next(iter);

throuw the iter.

You will see that this will output yyy. As we are having 3 times v.
While the signature of the message iterator is y.

If you now call eldbus_message_iter_arguments_get(message, "y", &cont)
it will return false, with the errormessage in line 766, reason for this
is that the type of the signature iterator differs from the message
iterator. Because of the upper example.
So all in all: The signature given to the method has not to be equal to
the signature of the message iterator, it has to be equal to the
iterated signature, which cannot be found easily with the eldbus api.

The solution is to only iterate in the message iterator that long until
the signature iterator is at the end, if the type differs in this
region, give a error and return false. Otherwise return true.

The sad thing about this is that it is a behaviour break, but the
behaviour is borked, so its a fix.

I tested this over a week now, without any problem in efl/elm/e.

Reviewers: stefan_schmidt, zmike

Reviewed By: stefan_schmidt

Subscribers: zmike, ceolin, simotek, DaveMDS, cedric

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D3074
2015-10-02 09:14:29 +02:00
Chris Michael 6e46642dfb eldbus: Fix possible null dereference reported by Coverity
Summary: Fix Coverity CID1256952: reports a null derefence here due to
eldbus_message_new returning NULL, thus causing a null dereference
when trying to set reply->dbus_msg

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-10 13:24:54 -05:00
Stefan Schmidt 7d4c063fbb eldbus: Only call va_end() if the signature does not match after rewrite
If git log is right this is patch number 4 for this CID. Lets hope we handle all
cases for starting and ending va now.

CID 1039883
2014-09-04 10:35:05 +02:00
Carsten Haitzler 7957721849 eldbus - fix missing varags va_end
fix CID 1039883
2014-09-01 19:40:47 +09:00
Carsten Haitzler 463f5a29f9 eldbus - fix varargs usage - missing va_end on return
this fixes CID 1039883
2014-08-25 11:50:36 +09:00
Carsten Haitzler e263af08c9 eldbus - fix varargs missing end in iter get and next
there was an error return handler that would return without doing
va_end(). coverity picked this up. this fixes CID 1039883
2014-08-14 18:53:40 +09:00
Carsten Haitzler 29b3c80385 eldbus: error message iters should be initted as readonly. 2013-06-22 20:15:44 +09:00
José Roberto de Souza dd25e02d5c eldbus: Add eldbus_message_iter_fixed_array_append() 2013-05-04 10:38:55 -03:00
Lucas De Marchi 4e3804041f Rename edbus->eldbus
git grep -l edbus2 | while read f; do sed -i 's/edbus2/eldbus/g' "$f"; done
find . -name '*edbus2*' -exec rename edbus2 eldbus {} \;

git grep -l "EDBUS" | while read f; do sed -i 's/EDBUS/ELDBUS/g' "$f"; done
git grep -l "EDBus" | while read f; do sed -i 's/EDBus/Eldbus/g' "$f"; done
git grep -l "edbus (v2)" | while read f; do sed -i 's/edbus (v2)/eldbus/g' "$f"; done
git grep -l "Edbus" | while read f; do sed -i 's/Edbus/Eldbus/g' "$f"; done
git grep -l "edbus" | while read f; do sed -i 's/edbus/eldbus/g' "$f"; done

find . -name '*edbus*' -exec rename edbus eldbus {} \;
find . -name '*EDBus*' -exec rename EDBus Eldbus {} \;
2013-04-23 12:36:29 -03:00