-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spoa-mirror failing #11
Comments
Hello @mark-k-english, I apologize for not answering so far. I should have some free time soon so I'll pay attention to this. |
I understand. I pulled down the latest version spoa-mirror v1.2.9 [build
2407] by Miroslav Zagorac <[email protected]>, Apr 25 2020
In spoa-message.c I added the following at line 499 to address a seg fault.
if (! _NULL((*data)->hdrs))
list_for_each_entry_safe(hdr, hdr_back, (*data)->hdrs, list)
buffer_ptr_free(&hdr);
Also, I've come across issues with header parsing/processing in util.c. I
have not found the true issue but I worked around it with the following
which I hope you can address properly; i realize this is a major hack. I
started getting malloc errors because n would equal a very very large
number and then pass that to buffer_grow which failed due to OOM.
This is within buffer_grow_va
/*
if (_nNULL(src = va_arg(ap, typeof(src))))
n = va_arg(ap, typeof(n));
*/
if (_nNULL(src = va_arg(ap, typeof(src)))) {
int l = strlen((const char *) src);
n = va_arg(ap, typeof(n));
if(l == 0) {
if (_nNULL(src = va_arg(ap, typeof(src)))) {
l = strlen((const char *) src);
n = va_arg(ap, typeof(n));
}
}
It's been years since I've done C so don't laugh to loud.
Currently with these changes I've not run into anything else. Thanks - ME
…On Mon, Apr 27, 2020 at 11:49 AM Miroslav Zagorac ***@***.***> wrote:
Hello @mark-k-english <https://github.com/mark-k-english>,
I apologize for not answering so far. I should have some free time soon so
I'll pay attention to this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHZ5AC6XT67DP5CBQWSVJD3ROXHSTANCNFSM4LFI76FQ>
.
|
Oh, one more thing for you to review. In spoa-message.c line 282 you're
breaking when a header has no value, shouldn't this be a continue to
finish processing the other headers? TX ME
On Tue, Apr 28, 2020 at 10:14 AM Mark English <[email protected]>
wrote:
… I understand. I pulled down the latest version spoa-mirror v1.2.9 [build
2407] by Miroslav Zagorac ***@***.***>, Apr 25 2020
In spoa-message.c I added the following at line 499 to address a seg fault.
if (! _NULL((*data)->hdrs))
list_for_each_entry_safe(hdr, hdr_back, (*data)->hdrs, list)
buffer_ptr_free(&hdr);
Also, I've come across issues with header parsing/processing in util.c. I
have not found the true issue but I worked around it with the following
which I hope you can address properly; i realize this is a major hack. I
started getting malloc errors because n would equal a very very large
number and then pass that to buffer_grow which failed due to OOM.
This is within buffer_grow_va
/*
if (_nNULL(src = va_arg(ap, typeof(src))))
n = va_arg(ap, typeof(n));
*/
if (_nNULL(src = va_arg(ap, typeof(src)))) {
int l = strlen((const char *) src);
n = va_arg(ap, typeof(n));
if(l == 0) {
if (_nNULL(src = va_arg(ap, typeof(src)))) {
l = strlen((const char *) src);
n = va_arg(ap, typeof(n));
}
}
It's been years since I've done C so don't laugh to loud.
Currently with these changes I've not run into anything else. Thanks - ME
On Mon, Apr 27, 2020 at 11:49 AM Miroslav Zagorac <
***@***.***> wrote:
> Hello @mark-k-english <https://github.com/mark-k-english>,
>
> I apologize for not answering so far. I should have some free time soon
> so I'll pay attention to this.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#11 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AHZ5AC6XT67DP5CBQWSVJD3ROXHSTANCNFSM4LFI76FQ>
> .
>
|
Hello @mark-k-english, regarding spoa-message.c:282 line, in case the buffer_grow() function cannot allocate memory, the processing of the other headers is interrupted because it no longer makes sense. As for the rest, I'll take a look when I get more free time. Thanks for your understanding and for reporting the bug. :) |
Hello, @mark-k-english, please check if the latest version of the program solves your problem. Best regards, |
@zaga00 no it doesn help FROM centos:7 log debug output: |
Version 1.2.6 build 2388, centos 6
POSTing a message causes the process to core dump.
gdb shows:
Program terminated with signal 11, Segmentation fault.
#0 0x00000000004051cf in mir_ptr_free (data=0x7f2a7119e121) at spoa-message.c:476
476 PTR_FREE((*data)->path);
mirror.log
The text was updated successfully, but these errors were encountered: