Instead push a valid address with zero length otherwise the Forth find-method word can reference a NULL pointer.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- libopenbios/bindings.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libopenbios/bindings.c b/libopenbios/bindings.c index 4f7a993..926944d 100644 --- a/libopenbios/bindings.c +++ b/libopenbios/bindings.c @@ -161,7 +161,12 @@ my_self( void ) xt_t find_package_method( const char *method, phandle_t ph ) { - push_str( method ); + if (method == NULL) { + push_str(""); + } else { + push_str( method ); + } + PUSH_ph( ph ); fword("find-method"); if( POP() )