diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2008-02-02 17:25:40 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2008-02-02 17:25:40 +0000 |
commit | 677eb18d202d100871dd6b08a18db9dba314ed3b (patch) | |
tree | be5bef5296434902f49f006f350c91544fdda44d /asn1/h450-ros | |
parent | f4871e6269b60873a2a82db5f8c88ef8228d9c1b (diff) |
Rewrote some prohibited APIs in epan/dissectors/ (sprintf, strcpy, strcat).
If we get some truncated strings we probably overwrote some buffers...
svn path=/trunk/; revision=24249
Diffstat (limited to 'asn1/h450-ros')
-rw-r--r-- | asn1/h450-ros/h450-ros.cnf | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/asn1/h450-ros/h450-ros.cnf b/asn1/h450-ros/h450-ros.cnf index 3d1e71b75f..811f2ffe8d 100644 --- a/asn1/h450-ros/h450-ros.cnf +++ b/asn1/h450-ros/h450-ros.cnf @@ -48,13 +48,17 @@ InvokeProblem VAL_PTR = &problem_val ReturnResultProblem VAL_PTR = &problem_val ReturnErrorProblem VAL_PTR = &problem_val #.FN_FTR GeneralProblem - strcpy(problem_str, val_to_str(problem_val, VALS(h450_ros_GeneralProblem_vals), "")); + strncpy(problem_str, val_to_str(problem_val, VALS(h450_ros_GeneralProblem_vals), ""), 64); + problem_str[64-1] = '\0'; #.FN_FTR InvokeProblem - strcpy(problem_str, val_to_str(problem_val, VALS(h450_ros_InvokeProblem_vals), "")); + strncpy(problem_str, val_to_str(problem_val, VALS(h450_ros_InvokeProblem_vals), ""), 64); + problem_str[64-1] = '\0'; #.FN_FTR ReturnResultProblem - strcpy(problem_str, val_to_str(problem_val, VALS(h450_ros_ReturnResultProblem_vals), "")); + strncpy(problem_str, val_to_str(problem_val, VALS(h450_ros_ReturnResultProblem_vals), ""), 64); + problem_str[64-1] = '\0'; #.FN_FTR ReturnErrorProblem - strcpy(problem_str, val_to_str(problem_val, VALS(h450_ros_ReturnErrorProblem_vals), "")); + strncpy(problem_str, val_to_str(problem_val, VALS(h450_ros_ReturnErrorProblem_vals), ""), 64); + problem_str[64-1] = '\0'; #.END #--- INVOKE --- |