projects
/
oweals
/
cde.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rpc.cmsd: use TIRPC on Linux
[oweals/cde.git]
/
cde
/
programs
/
dtlogin
/
policy.c
diff --git
a/cde/programs/dtlogin/policy.c
b/cde/programs/dtlogin/policy.c
index b785494806c29f812003540bbd35997088d0b3d7..1b61b0d75bf1f3c333ee33925d0fd4d3d52bb3c6 100644
(file)
--- a/
cde/programs/dtlogin/policy.c
+++ b/
cde/programs/dtlogin/policy.c
@@
-16,7
+16,7
@@
* details.
*
* You should have received a copy of the GNU Lesser General Public
* details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with these librar
ar
ies and programs; if not, write
+ * License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
@@
-164,14
+164,16
@@
Willing(
#endif
ret = AcceptableDisplayAddress (addr, connectionType, type);
if (!ret)
#endif
ret = AcceptableDisplayAddress (addr, connectionType, type);
if (!ret)
- s
printf (statusBuf
, "Display not authorized to connect");
+ s
nprintf (statusBuf, sizeof(statusBuf)
, "Display not authorized to connect");
else
else
- s
printf (statusBuf
, "%s", WillingMsg());
+ s
nprintf (statusBuf, sizeof(statusBuf)
, "%s", WillingMsg());
#if 0
#if 0
- s
printf (statusBuf
, "host %s", localHostname());
+ s
nprintf (statusBuf, sizeof(statusBuf)
, "host %s", localHostname());
#endif
#endif
+ /* enforce termination */
+ statusBuf[255] = '\0';
- status->length = strlen
(statusBuf);
+ status->length = strlen(statusBuf);
status->data = (CARD8Ptr) malloc (status->length);
if (!status->data)
status->length = 0;
status->data = (CARD8Ptr) malloc (status->length);
if (!status->data)
status->length = 0;