Re: unsafe_string_function_usage_here when linking smbd | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
On Jun 8, 2008, at 1:47 PM, Bengt Nilsson wrote:
I was wrong about building completed. After removing smbd and re-make I got Linking bin/smbd ld: Unresolved: srvstr_push_fn2 make: *** [bin/smbd] Error 1
A quick summary of what I've discovered today:
The offending line (that generates the unresolved error
when linking smbd) is line 3694 of trans2.c, which is in
the function call_trans2qfilepathinfo. Here it is with a bit
of context:
pdata += 24;
SIVAL(pdata,0,ea_size);
pdata += 4; /* EA info */
len = srvstr_push(outbuf, pdata+4,
dos_fname, max_data_bytes - (pdata+4 - *ppdata), STR_UNICODE);
SIVAL(pdata,0,len);
pdata += 4 + len;
data_size = PTR_DIFF(pdata,(*ppdata));
Line 3964 is the "len = srvstr_push()" call. That line is
expanded by the cpp into:
len = ((sizeof(pdata+4) != (max_data_bytes - (pdata+4 - *ppdata)) &&
sizeof(pdata+4) != sizeof(char *)) ?
__unsafe_string_function_usage_here_size_t__() : srvstr_push_fn((""),
(0), outbuf, pdata+4, dos_fname, max_data_bytes - (pdata+4 -
*ppdata), 8));
And it's this line which, when compiled, returns the reference to __unsafe_string_function_usage_here_size_t__ instead of a reference to srvstr_push_fn. So either ((sizeof(pdata+4) != (max_data_bytes - (pdata+4 - *ppdata)) is evaluating to an unexpected value, or sizeof(pdata+4) != sizeof(char *)) is. I can't spend any more time on this today, but maybe this update will suggest something to someone here. -- Kai Lanz -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Linux] [Info Cyrus] [LARTC] [Christmas Music] [Bugtraq] [Netfilter] [Internet Dating Forums] [RAID] [Yosemite News] [Photography]
![]() |
![]() |