summaryrefslogtreecommitdiff
path: root/src/sm_client.c
AgeCommit message (Collapse)Author
2022-12-04Handle arrays too large to fit in iceConn buffersAlan Coopersmith
Fixes numerous gcc warnings of the form: sm_client.c: In function ‘SmcOpenConnection’: SMlibint.h:109:25: warning: potential null pointer dereference [-Wnull-dereference] *((CARD32 *) _pBuf) = _val; \ SMlibint.h:160:5: note: in expansion of macro ‘STORE_CARD32’ STORE_CARD32 (_pBuf, (CARD32) _len); \ ^~~~~~~~~~~~ sm_client.c:207:5: note: in expansion of macro ‘STORE_ARRAY8’ STORE_ARRAY8 (pData, len, previousId); ^~~~~~~~~~~~ v2: Raise required libICE version to 1.1.0 to get the updated IceGetHeaderExtra macro definition needed for this to work correctly. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-12-04SmcCloseConnection: remove unnecessary cast from free()Alan Coopersmith
commit b17f93a1d041e63261ff followed the style of the time it was written, before commit e77dd2e4bc8227 had removed them. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-08-26Fix some potential memory leaks in SmcCloseConnection().Kim Woelders
Signed-off-by: Kim Woelders <kim@woelders.dk> Reviewed-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2022-03-05Fix spelling/wording issuesAlan Coopersmith
Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-09Fix some clang warnings about integer size/sign conversionsAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-09Constify previous_id argument to SmcOpenConnectionAlan Coopersmith
Clears gcc warning of: sm_client.c: In function 'SmcOpenConnection': sm_client.c:199:13: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-01-04unifdef -U__UNIXOS2__Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-12-09Remove a bunch of unnecessary casts with malloc & free callsAlan Coopersmith
With modern compilers and headers, they cause more problems than they solve and just hide real issues. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: James Cloos <cloos@jhcloos.com>
2011-12-09Replace malloc(strlen) + strcpy sets with strdup callsAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: James Cloos <cloos@jhcloos.com>
2011-09-16Strip trailing whitespaceAlan Coopersmith
Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}' git diff -w & git diff -b show no diffs from this change Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2009-01-28Janitor: ansification, make distcheck, compiler warnings.Paulo Cesar Pereira de Andrade
2008-11-29avoid gcc warnings for libSMPaulo Cesar Pereira de Andrade
Patch from http://bugs.freedesktop.org/show_bug.cgi?id=17968 adapted to current sources. This corrects a potential (hypothetical) segmentation fault.
2008-10-17Bug #17644: Fix valgrind warning in _SmcProcessMessageCaolan McNamara
2007-05-13Removed some global writable variables.Tilman Sauerbeck
2006-03-17Specs say SmsInitialize & SmcOpenConnection return NULL terminated stringsXORG-7_0_99_901Alan Coopersmith
in errorStringRet, but were just calling strncpy and not making sure strings were NULL terminated if errorLength wasn't long enough. (Noticed while evaluating Coverity ids 196 & 201.)
2005-05-17- Conditionally include config.h in xc/lib/SMXORG-6_8_99_9XORG-6_8_99_8XORG-6_8_99_10Søren Sandmann Pedersen
- Add libSM to symlink.sh - Add SM build system
2003-11-14R6.6 is the Xorg base-lineXORG-MAINXORG-STABLEKaleb Keithley