Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ioctl] Incorrect conversion between integer types #3522

Merged
merged 11 commits into from
Jul 14, 2022

Conversation

huof6829
Copy link
Contributor

@huof6829 huof6829 commented Jul 12, 2022

Description

fix Code scanning #12~#19

Fixes #3524

Type of change

Please delete options that are not relevant.

  • [] Bug fix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • [] Code refactor or improvement
  • [] Breaking change (fix or feature that would cause a new or changed behavior of existing functionality)
  • [] This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [] make test
  • [] fullsync
  • [] Other test (please specify)

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • [] My code follows the style guidelines of this project
  • [] I have performed a self-review of my code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • [] My changes generate no new warnings
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] New and existing unit tests pass locally with my changes
  • [] Any dependent changes have been merged and published in downstream modules

@huof6829 huof6829 requested a review from a team as a code owner July 12, 2022 11:11
@codecov
Copy link

codecov bot commented Jul 12, 2022

Codecov Report

Merging #3522 (0a9cefc) into master (a20e489) will decrease coverage by 0.85%.
The diff coverage is 68.59%.

@@            Coverage Diff             @@
##           master    #3522      +/-   ##
==========================================
- Coverage   75.43%   74.58%   -0.86%     
==========================================
  Files         247      252       +5     
  Lines       22845    23116     +271     
==========================================
+ Hits        17233    17240       +7     
- Misses       4685     4950     +265     
+ Partials      927      926       -1     
Impacted Files Coverage Δ
blockchain/blockchain.go 0.89% <0.00%> (ø)
blockchain/pubsubmanager.go 0.00% <0.00%> (ø)
config/config.go 94.06% <ø> (+9.31%) ⬆️
ioctl/newcmd/alias/alias.go 0.00% <0.00%> (ø)
ioctl/newcmd/bc/bc.go 37.50% <0.00%> (+0.46%) ⬆️
actpool/config.go 60.00% <60.00%> (ø)
blockchain/config.go 65.78% <65.78%> (ø)
action/protocol/poll/protocol.go 68.13% <66.66%> (-0.35%) ⬇️
ioctl/newcmd/bc/bcbucketlist.go 98.66% <87.50%> (-1.34%) ⬇️
action/consignment_transfer.go 90.41% <100.00%> (ø)
... and 29 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bfbaece...0a9cefc. Read the comment docs.

@huof6829 huof6829 marked this pull request as draft July 12, 2022 12:56
@huof6829 huof6829 marked this pull request as ready for review July 12, 2022 15:32
@huof6829
Copy link
Contributor Author

BucketIdx: int(bucketIdx),
Nonce: int(nonce),
BucketIdx: bucketIdx,
Nonce: nonce,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

open a new PR for this

@@ -117,7 +117,7 @@ func isExist(path string) bool {
}

func rename(oldPath string, newPath string, c chan bool) {
if isExist(_givenPath + "/" + oldPath) {
if isExist(oldPath) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

open a new PR for this part, and link to #3525 or #3526


default:
log.Println("Don't support this IDE yet. Can not handle websocket method: " + request.Key)
log.Println("Don't support this IDE yet. Can not handle websocket method: " + easpcapeString(request.Key))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

printf

@dustinxie dustinxie linked an issue Jul 12, 2022 that may be closed by this pull request
1 task
@dustinxie dustinxie changed the title [ioctl] Fix code scanning #1~#19 [ioctl] Incorrect conversion between integer types Jul 12, 2022
@Liuhaai Liuhaai merged commit ad61fa3 into iotexproject:master Jul 14, 2022
pocockn added a commit to pocockn/iotex-core that referenced this pull request Jul 19, 2022
* upstream/master: (28 commits)
  [ioctl] Incorrect conversion between integer types (iotexproject#3522)
  [action] fix incorrect conversion between integer types (iotexproject#3545)
  [test] fix TestLoadBlockchainfromDB (iotexproject#3521)
  [ioctl] correct Chinese usage message (iotexproject#3510)
  fix err not hanled (iotexproject#3509)
  add ReadHeaderTimeout (iotexproject#3539)
  [iotcl] Reset config cmd (iotexproject#3496)
  Update gosec.yaml
  Update ci.yaml
  Update analysis.yaml
  Delete gosec.yaml.bak
  Create gosec.yaml
  [config] move config.ActPool to actpool package refactor (iotexproject#3514)
  Update ci.yaml
  Update analysis.yaml
  Update analysis.yaml
  [config] move config.Chain to blockchain package (iotexproject#3511)
  remove circleci (iotexproject#3498)
  [ioctl] Build block bucketlist command line into new ioctl (iotexproject#3469)
  [config] remove  EVMNetworkID() and SetEVMNetworkID() (iotexproject#3503)
  ...
@huof6829 huof6829 deleted the fix_code_scan branch August 4, 2022 14:04
pocockn added a commit to pocockn/iotex-core that referenced this pull request Jun 3, 2023
* upstream/master: (45 commits)
  Task: Get config cmd (iotexproject#3552)
  [ioctl] fix  Errors unhandled (iotexproject#3567)
  fix dir permission and file inclusion (iotexproject#3566)
  [test] Disable workingset cache in the benchmark test (iotexproject#3558)
  [pkg] fix  deferring unsafe method "Close" on type "*os.File" (iotexproject#3548)
  [action] Refactor handleTransfer() (iotexproject#3557)
  Add MinVersion in tls.Config (iotexproject#3562)
  [ioctl] Modify file permission as 0600 (iotexproject#3563)
  [httputil] add ReadHeaderTimeout (iotexproject#3550)
  [staking] unexport namespace (iotexproject#3551)
  move chanid metrics to chainservice (iotexproject#3544)
  [ioctl] fix log entries created from user input (iotexproject#3546)
  add log in rolldposctx (iotexproject#3553)
  fix uncontrolled data used in path expression (iotexproject#3547)
  [api] impl. TestGrpcServer_GetServerMeta (iotexproject#3559)
  [ioctl] Build action command line into new ioctl (iotexproject#3472)
  fix potential file inclusion via variable (iotexproject#3549)
  [ioctl] Incorrect conversion between integer types (iotexproject#3522)
  [action] fix incorrect conversion between integer types (iotexproject#3545)
  [test] fix TestLoadBlockchainfromDB (iotexproject#3521)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ioctl] incorrect conversion between integer types
4 participants