Eric Maryniak
2000-Oct-17 14:27 UTC
string overflow by nn in safe_strcpy: request for enhancement
Dear readers, I read that I should post/discuss "bugs" for which one is unable to provide a fix (as diff -u), so here goes... please excuse my ignorance about Samba or proper etiquette on this list --- I'm new ;-) ==Samba version: samba-2.0.7-13.src.rpm Operating sys: SuSE Linux 6.3 Suggested fix: increase MAX_LEN for filenames from 127 to, say, 255? Users using Win98 and copying to Samba exported shares have errors like often in the log file: [2000/05/22 16:20:27, 0] lib/util_str.c:safe_strcpy(813) ERROR: string overflow by 18 in safe_strcpy [http--www.shellgeostar.com-guide-guide.aspCountryI] [2000/08/03 12:34:18, 0] lib/util_str.c:safe_strcpy(841) ERROR: string overflow by 3 in safe_strcpy [RESEARCHINDEX THE NECI SCIENTIFIC LITERATURE DIGIT] (Favorite/bookmark links can be long sometimes). After investigation it was evident that there is a string limit of 127. I have checked out the CVS source, however, I could not locate the exact places where this limit was set. There were several and I didn't feel confident to patch. So please excuse me for not including a diff -u. However, I think that a Samba developer who is knowledgable about the source will know exactly what is happening where. I would suggest increasing the max. length for filenames to 255, because this also seems to be the limit on Windows. == Bye-bye, Eric -- Eric Maryniak <e.maryniak@pobox.com> Home page: http://pobox.com/~e.maryniak/ University of Amsterdam, Department of Psychology. Tel/Fax: +31 20 5256853/6391656. Internet: http://www.neuromod.org/ To be is to do. - I. Kant To do is to be. - J.P. Sartre Yabba-Dabba-Doo! - F. Flintstone
Gerald Carter
2001-Feb-15 07:41 UTC
string overflow by nn in safe_strcpy: request for enhancement
Eric Maryniak wrote:> > However, I think that a Samba developer who is > knowledgable about the source will know exactly what > is happening where. I would suggest increasing the max. > length for filenames to 255, because this also seems to be > the limit on Windows.Eric, I was just reviewing old mail and found this one from you. See smb.h:#define FSTRING_LEN 128 The fstring and pstring data types in samba are due for an overhaul. We ackowledge this and have been considering what to do. obviously converting from static strings to dynamic strings is not a trivial thing. Just wanted to respond so you didn't think you comments got ignored. :-) CHeers, jerry ---------------------------------------------------------------------- /\ Gerald (Jerry) Carter Professional Services \/ http://www.valinux.com/ VA Linux Systems gcarter@valinux.com http://www.samba.org/ SAMBA Team jerry@samba.org http://www.plainjoe.org/ jerry@plainjoe.org "...a hundred billion castaways looking for a home." - Sting "Message in a Bottle" ( 1979 )