~ubuntu-branches/debian/experimental/ettercap/experimental

« back to all changes in this revision

Viewing changes to src/dissectors/ec_o5logon.c

  • Committer: Package Import Robot
  • Author(s): Barak A. Pearlmutter
  • Date: 2013-03-27 11:55:24 UTC
  • mfrom: (25.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20130327115524-ahjhvuh03ejcfuui
Tags: 1:0.7.6-2~exp1
Experimental release with IPv6 support

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
   char tmp[MAX_ASCII_ADDR_LEN];
65
65
   struct o5logon_status *conn_status;
66
66
 
 
67
   //suppress unused warning
 
68
   (void)end;
 
69
 
67
70
   if (FROM_CLIENT("o5logon", PACKET)) {
68
71
 
69
72
      /* Interesting packets have len >= 4 */
94
97
              last--;
95
98
            }
96
99
            int length = *(last+1);
97
 
            strncpy((char*)conn_status->user, (char*)last + 2, length);
98
 
            conn_status->user[length] = 0;
 
100
            if (length < sizeof(conn_status->user))
 
101
            {
 
102
               strncpy((char*)conn_status->user, (char*)last + 2, length);
 
103
               conn_status->user[length] = 0;
 
104
            }
99
105
 
100
106
            /* save the session */
101
107
            session_put(s);