Skip to content
jim518057 edited this page Oct 14, 2021 · 2 revisions

These days I use this code for try to add functions to support my Android HUAWEI P9. Because my HUAWEI P9 is API level 23, which doesn't have this function in NDK.

When I write a small program for test, It's always cause stack corruption in my Android phone.

After debug and trace, I found at:

https://github.com/morristech/android-ifaddrs/blob/8f9a87cd8d1a9c0cd1219f1ab9ef4ad1947cae30/ifaddrs.c#L473

char l_mask[16] = {0};

I change this line to: char l_mask[20] = {0};

It looks like work well now.

Clone this wiki locally