UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Newbie momara
Newbie
192 Views
Registered: ‎07-03-2019

xil_printf null pointer de-reference

Jump to solution

if(ctrl != NULL) {
ch = *ctrl;
}
else {
ch = *ctrl;
}

This seems to be a mis implementation as still the code is de referencing the ctrl pointer despite being pointing to NULL

is this OK?

1 Solution

Accepted Solutions
Moderator
Moderator
114 Views
Registered: ‎03-25-2019

Re: xil_printf null pointer de-reference

Jump to solution

Hi @momara ,

Thanks for reporting this!
I'll report that internally.

Best regards,
Abdallah
-------------------------------------------------------------------------------
Please don't forget to reply, kudo and accept as a solution
2 Replies
Teacher xilinxacct
Teacher
156 Views
Registered: ‎10-23-2018

Re: xil_printf null pointer de-reference

Jump to solution

@momara 

If in your example, both paths (if and the else) dereference the ptr... the else case is an error.

Hope that Helps
If so, Please mark as solution accepted. Kudos also welcomed. :-)

Moderator
Moderator
115 Views
Registered: ‎03-25-2019

Re: xil_printf null pointer de-reference

Jump to solution

Hi @momara ,

Thanks for reporting this!
I'll report that internally.

Best regards,
Abdallah
-------------------------------------------------------------------------------
Please don't forget to reply, kudo and accept as a solution