From: Zdenek S. <st...@us...> - 2013-05-22 10:05:09
|
Update of /cvsroot/ipmitool/ipmitool/lib In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv25216/lib Modified Files: ipmi_main.c Log Message: ID: 3522740 - reading password from file is limited to 16byte passwords Reading password from file is no longer limited to 16bytes. Reported-by: Dune Idaho Index: ipmi_main.c =================================================================== RCS file: /cvsroot/ipmitool/ipmitool/lib/ipmi_main.c,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** ipmi_main.c 6 May 2013 14:08:55 -0000 1.42 --- ipmi_main.c 22 May 2013 10:05:06 -0000 1.43 *************** *** 102,106 **** int l; ! pass = malloc(16); if (pass == NULL) { lprintf(LOG_ERR, "ipmitool: malloc failure"); --- 102,106 ---- int l; ! pass = malloc(21); if (pass == NULL) { lprintf(LOG_ERR, "ipmitool: malloc failure"); *************** *** 108,111 **** --- 108,112 ---- } + memset(pass, 21, 0); fp = ipmi_open_file_read((const char *)filename); if (fp == NULL) { *************** *** 116,120 **** /* read in id */ ! if (fgets(pass, 16, fp) == NULL) { lprintf(LOG_ERR, "Unable to read password from file %s", filename); --- 117,121 ---- /* read in id */ ! if (fgets(pass, 21, fp) == NULL) { lprintf(LOG_ERR, "Unable to read password from file %s", filename); |