summaryrefslogtreecommitdiffstats
path: root/mac.c
diff options
context:
space:
mode:
authordscho <dscho>2002-08-31 14:09:39 +0000
committerdscho <dscho>2002-08-31 14:09:39 +0000
commit0024d7472768635915ee6cc511fc258c121b9b9c (patch)
tree580af88fd581169fbdd2e3a5a02df54e918acc99 /mac.c
parent08bfb7cb63cd2e9ed35f854965d80833e1e9c8b3 (diff)
downloadlibtdevnc-0024d747.tar.gz
libtdevnc-0024d747.zip
compiler warnings and format vulnerabilities fixed
Diffstat (limited to 'mac.c')
-rw-r--r--mac.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mac.c b/mac.c
index 210deef..eec4bcc 100644
--- a/mac.c
+++ b/mac.c
@@ -552,6 +552,8 @@ int main(int argc,char *argv[])
for(i=argc-1;i>0;i--)
#ifdef LOCAL_CONTROL
if(i<argc-1 && !strcmp(argv[i],"-toggleviewonly")) {
+ if(strlen(argv[i+1])>1022)
+ argv[i+1][1022]=0;
sprintf(message,"t%s",argv[i+1]);
send_message(&single_instance,message);
exit(0);
@@ -562,6 +564,8 @@ int main(int argc,char *argv[])
} else
#ifdef BACKCHANNEL
if(i<argc-1 && !strcmp(argv[i],"-backchannel")) {
+ if(strlen(argv[i+1])>1022)
+ argv[i+1][1022]=0;
sprintf(message,"b%s",argv[i+1]);
send_message(&single_instance,message);
exit(0);