Changeset 4896 for trunk/module-cccam.c
- Timestamp:
- 04/02/11 23:26:47 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-cccam.c
r4868 r4896 1691 1691 int cc_parse_msg(struct s_client *cl, uint8 *buf, int l) { 1692 1692 struct s_reader *rdr = (cl->typ == 'c') ? NULL : cl->reader; 1693 1693 uint8 token[256]; 1694 1694 int ret = buf[1]; 1695 1695 struct cc_data *cc = cl->cc; … … 1740 1740 //Trick: when discovered partner is an Oscam Client, then we send him our version string: 1741 1741 if (cc->is_oscam_cccam) { 1742 s printf((char*) buf,1742 snprintf((char *)token, sizeof((char *)token), 1743 1743 "PARTNER: OSCam v%s, build #%s (%s) [EXT,SID]", CS_VERSION, 1744 1744 CS_SVN_VERSION, CS_OSTYPE); 1745 cc_cmd_send(cl, buf, strlen((char*) buf) + 1, MSG_CW_NOK1);1745 cc_cmd_send(cl, token, strlen((char *)token) + 1, MSG_CW_NOK1); 1746 1746 } 1747 1747 … … 1908 1908 param[0] = 0; 1909 1909 else { 1910 strcpy(param, " [");1910 cs_strncpy(param, " [", sizeof(param)); 1911 1911 if (cc->extended_mode) 1912 1912 addParam(param, "EXT"); … … 1916 1916 } 1917 1917 1918 sprintf((char*) buf, "PARTNER: OSCam v%s, build #%s (%s)%s", 1918 snprintf((char *)token, sizeof((char *)token), 1919 "PARTNER: OSCam v%s, build #%s (%s)%s", 1919 1920 CS_VERSION, CS_SVN_VERSION, CS_OSTYPE, param); 1920 cc_cmd_send(cl, buf, strlen((char*) buf) + 1, MSG_CW_NOK1);1921 cc_cmd_send(cl, token, strlen((char *)token) + 1, MSG_CW_NOK1); 1921 1922 } 1922 1923 } … … 2293 2294 { 2294 2295 //switching to an oder version and then disconnect... 2295 strcpy(cfg.cc_version, version[0]);2296 cs_strncpy(cfg.cc_version, version[0], sizeof(cfg.cc_version)); 2296 2297 ret = -1; 2297 2298 } 2298 2299 else //reader connection 2299 2300 { 2300 strcpy(cl->reader->cc_version, version[0]);2301 strcpy(cl->reader->cc_build, build[0]);2301 cs_strncpy(cl->reader->cc_version, version[0], sizeof(cl->reader->cc_version)); 2302 cs_strncpy(cl->reader->cc_build, build[0], sizeof(cl->reader->cc_build)); 2302 2303 cc_cli_close(cl, TRUE); 2303 2304 } … … 2672 2673 if (!cc->prefix) 2673 2674 cc->prefix = cs_malloc(&cc->prefix, strlen(cl->account->usr)+20, QUITERROR); 2674 s printf(cc->prefix, "cccam(s) %s: ", cl->account->usr);2675 snprintf(cc->prefix, strlen(cl->account->usr)+20, "cccam(s) %s: ", cl->account->usr); 2675 2676 2676 2677 … … 2873 2874 if (!cc->prefix) 2874 2875 cc->prefix = cs_malloc(&cc->prefix, strlen(cl->reader->label)+20, QUITERROR); 2875 s printf(cc->prefix, "cccam(r) %s: ", cl->reader->label);2876 snprintf(cc->prefix, strlen(cl->reader->label)+20, "cccam(r) %s: ", cl->reader->label); 2876 2877 2877 2878 cc->ecm_counter = 0; … … 3139 3140 3140 3141 void module_cccam(struct s_module *ph) { 3141 strcpy(ph->desc, "cccam");3142 cs_strncpy(ph->desc, "cccam", sizeof(ph->desc)); 3142 3143 ph->type = MOD_CONN_TCP; 3143 3144 ph->logtxt = ", crypted";
Note:
See TracChangeset
for help on using the changeset viewer.