Commit graph

19 commits

Author SHA1 Message Date
Alan Coopersmith
4400a68b3a unifdef Lynx
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-20 17:05:50 -08:00
Alan Coopersmith
54925250ad i18n: use memcpy instead of strncpy on unterminated char arrays
Avoids gcc warnings that we're using strncpy wrong to copy a known-length
set of characters without a terminating '\0' to a buffer whose length we
are checking separately.  (Should also be imperceptibly faster since we
no longer check if each byte is '\0' when we already know it won't be.)

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-08-28 20:29:27 +00:00
walter harms
d81fed4614 Remove more redundant null checks before Xfree()
Signed-off-by: Harms <wharms@bfs,de>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-06 17:24:39 -07:00
walter harms
b3c9f6a17e libX11/lcGenConv.c fix: dereferenced before check
* Do not use variables before checked for NULL.

Signed-off-by: Harms <wharms@bfs,de>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-06 17:05:55 -07:00
Alan Coopersmith
bf3501e039 Remove unnecessary casts of pointers to (char *) in calls to Xfree()
Left one cast behind that is necessary to change from const char *
to char * in src/xlibi18n/lcCharSet.c.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-20 12:51:09 -07:00
Alan Coopersmith
25a7a329de Remove even more casts of return values from Xmalloc/Xrealloc
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-20 12:51:09 -07:00
Alan Coopersmith
e7d46c6452 i18n modules: Fix some const cast warnings
imRm.c: In function '_XimSetICMode':
imRm.c:2419:37: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
imRm.c:2420:30: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]

lcGenConv.c: In function 'byteM_parse_codeset':
lcGenConv.c:345:13: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-20 12:51:09 -07:00
Thomas Klausner
a17ceb7100 Stop truncating source to destination length if it is larger.
It seems useless to do that since the code tests for both source
length and destination to be non-zero. This fixes a cut'n'paste
problem in xterm where the paste length was limited to 1024 (BUFSIZ)
in button.c.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-08 23:11:06 -07:00
Alan Coopersmith
d8956520de Fix "nomal" -> "normal" typo in several comments
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-14 17:53:00 -07:00
Xue Wei
002b36e308 mbtocs should not truncate input
Fixes pasting more than 1024 bytes into xterm, as described in
https://bugs.freedesktop.org/show_bug.cgi?id=25209

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-14 17:42:45 -07:00
Alan Coopersmith
09194042d3 Replace Xmalloc+bzero pairs with Xcalloc calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-18 17:49:13 -07:00
Ander Conselvan de Oliveira
e2566e43b0 lc/def/lcDefConv: Use Xcalloc to avoid use of uninitialized memory
Fixed by zero'ing conv on allocation with Xcalloc. Then
close_converter works properly.

Using uninitialized value "conv->state" in call to function "close_converter"

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-02-01 23:47:11 -08:00
Alan Coopersmith
ddb1786720 Purge CVS/RCS id tags
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-14 17:38:26 -08:00
Alan Coopersmith
c9f84af591 Remove ifdef checks for macII left over from ancient A/UX 3.0 support
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-03-17 14:59:16 -07:00
Alan Coopersmith
cf49e53701 Strip whitespace from end of lines in source files 2008-06-17 14:41:17 -07:00
Tilman Sauerbeck
1c75a94790 Bug #10475: Fixed lots of char*/const char* mixups.
I didn't fix all of them, as that would require touching
public headers.
2007-04-06 11:59:31 +02:00
Søren Sandmann Pedersen
7eee605e3a - For now put xtrans in X11/Xtrans/X11, since libX11 is looking for it in <X11/...>
- For Xcomposite and Xdamage, don't link the build system out of the xc tree
- Link the public X11 headers into their own directory
- Add links to XKeysymDB and XErrorDB
- Add links to all the Xlib man pages
- Add links to the lcUniConv subdirectory
- Conditionally include config.h in Xlib source
2005-05-13 22:53:36 +00:00
Egbert Eich
c6349f4319 Merging XORG-CURRENT into trunk 2004-04-23 18:42:09 +00:00
Kaleb Keithley
deae12c6b6 R6.6 is the Xorg base-line 2003-11-14 15:54:30 +00:00