~ubuntu-branches/ubuntu/natty/psqlodbc/natty

« back to all changes in this revision

Viewing changes to connection.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2004-05-13 10:47:36 UTC
  • Revision ID: james.westby@ubuntu.com-20040513104736-doxck1rd6ng2msgn
Tags: 1:07.03.0200-3
* urgency high since this is a security related bug and no other changes
  were made
* misc.c: added target buffer size parameter to make_string() to prevent
  buffer overflows and corrected all calls to it (closes: #247306)

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
 
108
108
        ci = &conn->connInfo;
109
109
 
110
 
        make_string(szDSN, cbDSN, ci->dsn);
 
110
        make_string(szDSN, cbDSN, ci->dsn, sizeof(ci->dsn));
111
111
 
112
112
        /* get the values for the DSN from the registry */
113
113
        memcpy(&ci->drivers, &globals, sizeof(globals));
120
120
         * override values from DSN info with UID and authStr(pwd) This only
121
121
         * occurs if the values are actually there.
122
122
         */
123
 
        make_string(szUID, cbUID, ci->username);
124
 
        make_string(szAuthStr, cbAuthStr, ci->password);
 
123
        make_string(szUID, cbUID, ci->username,sizeof(ci->username));
 
124
        make_string(szAuthStr, cbAuthStr, ci->password, sizeof(ci->password));
125
125
 
126
126
        /* fill in any defaults */
127
127
        getDSNdefaults(ci);