Senrian

Results issues of Senrian

比如两个孟姓小姐姐显示不出来

## Summary Fix CRITICAL severity buffer overflow vulnerability in `codes/c/utils/print_util.h`. ## Vulnerability | Field | Value | |-------|-------| | **ID** | V-001 | | **Severity** | CRITICAL | | **File**...

## Bug 描述 **Issue:** [#356](https://github.com/macrozheng/mall/issues/356) `OmsPortalOrderServiceImpl.calcPerCouponAmount()` 方法在计算优惠券分摊时,对每个商品独立计算并四舍五入到3位小数(`HALF_EVEN`),导致各商品分摊金额之和可能小于优惠券面额。 **复现案例:** - 商品价格:10元、10元、10元 - 总价:30元 - 优惠券面额:10元 - 原算法:(10/30)*10 = 3.333... → 四舍五入为 3.330 - 三个商品分摊金额合计:9.990元,少了0.01元 ## 修复方案 对前 `n-1` 个商品按比例计算分摊金额,最后一个商品获取剩余金额,确保分摊总额**精确等于**优惠券面额。最终金额四舍五入到2位小数。 ```java //...

## 问题描述 Issue #492: 商品价格优惠满减活动后端计算错误 设置满5减1,但接口返回的优惠金额只有0.98,还少了2毛钱。 ## 根本原因 在 `OmsPromotionServiceImpl.java` 中,满减金额计算使用了: ```java // 原代码:(商品原价/总价)*满减金额 BigDecimal reduceAmount = originalPrice.divide(totalAmount, 3, RoundingMode.HALF_EVEN) .multiply(fullReduction.getReducePrice()); ``` 当 `fullReduction.getReducePrice()` 为 0.98(满5减1中的1元)时: - `5.00 / 5.00...

## Fix #884 - 动态鉴权管理器路径匹配优化 ### 问题 后台资源配置通常不包含 `server.servlet.context-path`,如果配置了该值,通过 `request.getRequestURI()` 获取的路径会包含 context-path 前缀,导致路径匹配失败。 ### 修复 将 `request.getRequestURI()` 改为 `request.getRequestURI().substring(request.getContextPath().length())` ### 修改文件 `mall-security/src/main/java/com/macro/mall/security/component/DynamicSecurityFilter.java` Fixes #884

## Bug Description In `DumpCompactionLogCommand.java`, a `RandomAccessFile` is created to obtain a `FileChannel`, but neither the `RandomAccessFile` nor the `FileChannel` is ever closed. This causes a file descriptor leak. **Issue:**...

## Fix for Issue #134 **Problem:** The article claims time complexity O(n) (HashMap approach) but the C, Java, and Python implementations use nested loops O(n²). **Solution:** Updated all three code...

Fix bean name standardization using Introspector.decapitalize to follow Spring rules: URL stays URL, X becomes x, FooBah becomes fooBah