Changeset 1442:915450ee91c7 in freeDiameter for extensions
- Timestamp:
- Feb 27, 2020, 2:19:24 PM (4 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- extensions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/app_diameap/diameap_server.c
r1417 r1442 1961 1961 { 1962 1962 case 1: 1963 attribute_op = malloc(strlen(op)); 1964 memset(attribute_op, 0, strlen(op)); 1965 strncpy(attribute_op, op + 1, strlen(op) - 1); 1966 attribute_op[strlen(op)] = '\0'; 1963 attribute_op = calloc(strlen(op), sizeof(char *)); 1964 memcpy(attribute_op, op + 1, strlen(op) - 1); 1967 1965 break; 1968 1966 case 2: 1969 attribute_op = malloc(strlen(op)); 1970 memset(attribute_op, 0, strlen(op)); 1971 strncpy(attribute_op, op, strlen(op) - 1); 1972 attribute_op[strlen(op)] = '\0'; 1967 attribute_op = calloc(strlen(op), sizeof(char *)); 1968 memcpy(attribute_op, op, strlen(op) - 1); 1973 1969 break; 1974 1970 default: 1975 attribute_op = malloc(strlen(op) + 1); 1976 memset(attribute_op, 0, strlen(op) + 1); 1977 strcpy(attribute_op, op); 1978 attribute_op[strlen(op) + 1] = '\0'; 1971 attribute_op = calloc(strlen(op) + 1, sizeof(char *)); 1972 memcpy(attribute_op, op, strlen(op)); 1979 1973 } 1980 1974 if (strcmp(attribute_op, "=") == 0) -
extensions/app_radgw/rgw_clients.c
r1417 r1442 764 764 ret = getaddrinfo(buf, NULL, &hint, &res); 765 765 if (ret == 0) { 766 s trncpy(buf, res->ai_canonname, sizeof(buf));766 snprintf(buf, sizeof(buf), "%s", res->ai_canonname); 767 767 /* The name was resolved correctly, does it match the IP of the client? */ 768 768 for (ptr = res; ptr != NULL; ptr = ptr->ai_next) {
Note: See TracChangeset
for help on using the changeset viewer.