[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-frameworks-devel
Subject: D24489: KAutosaveFile not respecting maximum filename length
From: Ahmad Samir <noreply () phabricator ! kde ! org>
Date: 2019-12-01 16:54:50
Message-ID: b89e5e6ed317c40f3d8f793ecafcfd50 () localhost ! localdomain
[Download RAW message or body]
[Attachment #2 (text/plain)]
ahmadsamir added a comment.
IIUC, FILENAME_MAX corresponds to PATH_MAX, 4096 (bytes; or chars in an array).
NAME_MAX is the max. filename (the filename part only, without the canonical path) \
length, this is 255 on Linux.
So using FILENAME_MAX is correct in the code.
See:
https://www.gnu.org/software/libc/manual/html_node/Limits-for-Files.html , which \
talks about FILENAME_MAX, NAME_MAX and PATH_MAX .... \o/ /usr/include/stdio.h (from \
glibc-devel) /usr/include/bits/stdio_lim.h
And:
/usr/include/linux/limits.h:
#define NAME_MAX 255 /* # chars in a file name */
#define PATH_MAX 4096 /* # chars in a path name including nul */
REPOSITORY
R244 KCoreAddons
REVISION DETAIL
https://phabricator.kde.org/D24489
To: mardelle, #frameworks, dfaure
Cc: ahmadsamir, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
[Attachment #3 (text/html)]
<table><tr><td style="">ahmadsamir added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: \
right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: \
#F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: \
inline-block; border: 1px solid rgba(71,87,120,.2);" \
href="https://phabricator.kde.org/D24489">View Revision</a></tr></table><br \
/><div><div><p>IIUC, FILENAME_MAX corresponds to PATH_MAX, 4096 (bytes; or chars in \
an array).</p>
<p>NAME_MAX is the max. filename (the filename part only, without the canonical path) \
length, this is 255 on Linux.</p>
<p>So using FILENAME_MAX is correct in the code.</p>
<p>See:<br />
<a href="https://www.gnu.org/software/libc/manual/html_node/Limits-for-Files.html" \
class="remarkup-link" target="_blank" \
rel="noreferrer">https://www.gnu.org/software/libc/manual/html_node/Limits-for-Files.html</a> \
, which talks about FILENAME_MAX, NAME_MAX and PATH_MAX .... \o/<br \
/>
/usr/include/stdio.h (from glibc-devel)<br />
/usr/include/bits/stdio_lim.h</p>
<p>And:<br />
/usr/include/linux/limits.h:<br />
#define NAME_MAX 255 /* # chars in a file name */<br />
#define PATH_MAX 4096 /* # chars in a path name including nul \
*/</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R244 \
KCoreAddons</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D24489">https://phabricator.kde.org/D24489</a></div></div><br \
/><div><strong>To: </strong>mardelle, Frameworks, dfaure<br /><strong>Cc: \
</strong>ahmadsamir, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, \
bruns<br /></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic