Skip to content

Don't overallocate memory in attrs_from_List() #340

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

Merged
merged 1 commit into from
Jun 5, 2020

Conversation

tiran
Copy link
Member

@tiran tiran commented May 31, 2020

Allocate (strlen + 1) * sizeof(char) instead of
(strlen + 1) * sizeof(char*) for a char[] in
attrs_from_List().

Signed-off-by: Christian Heimes cheimes@redhat.com

Allocate ``(strlen + 1) * sizeof(char)`` instead of
``(strlen + 1) * sizeof(char*)`` for a ``char[]`` in
``attrs_from_List()``.

Signed-off-by: Christian Heimes <cheimes@redhat.com>
@tiran tiran added this to the 3.3 milestone May 31, 2020
@codecov
Copy link

codecov bot commented May 31, 2020

Codecov Report

Merging #340 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #340   +/-   ##
=======================================
  Coverage   69.38%   69.38%           
=======================================
  Files          39       39           
  Lines        3172     3172           
  Branches      484      484           
=======================================
  Hits         2201     2201           
  Misses        822      822           
  Partials      149      149           

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 63058a0...335a529. Read the comment docs.

Copy link
Member

@encukou encukou left a comment

Choose a reason for hiding this comment

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

Nice catch!

@encukou encukou merged commit a7671d8 into python-ldap:master Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy